rexleparser 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/rexleparser.rb +4 -3
  2. metadata +2 -2
data/lib/rexleparser.rb CHANGED
@@ -87,7 +87,7 @@ class RexleParser
87
87
  else
88
88
 
89
89
  raw_values << a.shift until a[0] == '<'
90
-
90
+
91
91
  if raw_values.length > 0 then
92
92
  value, attributes = get_value_and_attribs(raw_values)
93
93
  end
@@ -140,13 +140,14 @@ class RexleParser
140
140
 
141
141
  def get_value_and_attribs(raw_values)
142
142
 
143
- match_found = raw_values.match(/(.*)>([^>]*$)/)
143
+ match_found = raw_values.match(/([^>]*)>(.*)/)
144
+
144
145
  if match_found then
145
146
  raw_attributes, value = match_found.captures
146
147
  attributes = get_attributes(raw_attributes)
147
148
  end
148
149
 
149
- [value, attributes]
150
+ [value.gsub('>','&gt;').gsub('<','&lt;'), attributes]
150
151
  end
151
152
 
152
153
  def get_attributes(raw_attributes)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rexleparser
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.6
5
+ version: 0.4.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-10-07 00:00:00 Z
13
+ date: 2012-10-25 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: