xrc 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/xrc/parser.rb +12 -1
- data/lib/xrc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1c9b3c231ceb3468d44f981be594134f0a509c8
|
4
|
+
data.tar.gz: 2ae97cce486e72023042776436db68ca75bcf967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21aad4771710dd78c09f4473a00dbb4ce781c2a601855c40f87ed00a05a0a524f7a5043536ea0285a5189e8a7db4884b8bbffe53f843103c23c21e55125229c3
|
7
|
+
data.tar.gz: 8ea39b028a96bc0e149023844aefe9e4e27559929e1d61fb2c735c3fb52c240d9fea108eb7f64632aca170efb4060cf30315e5112055ad94694653e69440a58d
|
data/CHANGELOG.md
CHANGED
data/lib/xrc/parser.rb
CHANGED
@@ -37,11 +37,22 @@ module Xrc
|
|
37
37
|
|
38
38
|
def characters(text)
|
39
39
|
if current
|
40
|
-
text = REXML::Text.new(text, current.whitespace, nil, true)
|
40
|
+
text = REXML::Text.new(to_safe(text), current.whitespace, nil, true)
|
41
41
|
current.add(text)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
def to_safe(text)
|
46
|
+
text.chars.map do |c|
|
47
|
+
case c.ord
|
48
|
+
when *REXML::Text::VALID_CHAR
|
49
|
+
c
|
50
|
+
else
|
51
|
+
""
|
52
|
+
end
|
53
|
+
end.join
|
54
|
+
end
|
55
|
+
|
45
56
|
def end_document
|
46
57
|
end
|
47
58
|
|
data/lib/xrc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.4.5
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: XMPP Ruby Client.
|