rubys-gorp 0.1.1 → 0.1.2

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 (4) hide show
  1. data/gorp.gemspec +1 -1
  2. data/lib/gorp.rb +11 -0
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
data/gorp.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gorp}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sam Ruby"]
data/lib/gorp.rb CHANGED
@@ -223,6 +223,17 @@ rescue LoadError
223
223
  require 'rexml/document'
224
224
 
225
225
  def xhtmlparse(text)
226
+ begin
227
+ require 'htmlentities'
228
+ text.gsub! '&', '&'
229
+ text.gsub! '<', '<'
230
+ text.gsub! '>', '>'
231
+ text.gsub! ''', '''
232
+ text.gsub! '"', '"'
233
+ text.force_encoding('utf-8') if text.respond_to? :force_encoding
234
+ text = HTMLEntities.new.decode(text)
235
+ rescue LoadError
236
+ end
226
237
  REXML::Document.new(text)
227
238
  end
228
239
 
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Gorp
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubys-gorp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby