1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Backport #1806 [ruby-core:24506]; (REXML::Text.normalize): call to_s for input.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
wyhaines 2010-01-27 13:19:16 +00:00
parent 72c7ea79b5
commit 74eb575c8d
2 changed files with 6 additions and 2 deletions

View file

@ -1,6 +1,10 @@
Wed Jan 27 22:16:00 2010 Kirk Haines <khaines@ruby-lang.org>
* lib/rexml/text.rb: Backport #1806 [ruby-core:24506]; (REXML::Text.normalize): call to_s for input.
Tue Jan 26 3:03:00 2010 Kirk Haines <khaines@ruby-lang.org> Tue Jan 26 3:03:00 2010 Kirk Haines <khaines@ruby-lang.org>
* eval.c: Backport #2039 [ruby-core:25339]; backported r24413, r24416, r24442 to fix a problem with IO#select and threads. This is the same issues as Bug #1993 [ruby-core:25114]. * eval.c: Backport #2039 [ruby-core:25339]; backported r24413, r24416, r24442 to fix a problem with IO#select and threads. This is the same issues as Bug #1993 [ruby-core:25114]. r26435
Thu Jan 21 5:10:00 2010 Kirk Haines <khaines@ruby-lang.org> Thu Jan 21 5:10:00 2010 Kirk Haines <khaines@ruby-lang.org>

View file

@ -286,7 +286,7 @@ module REXML
EREFERENCE = /&(?!#{Entity::NAME};)/ EREFERENCE = /&(?!#{Entity::NAME};)/
# Escapes all possible entities # Escapes all possible entities
def Text::normalize( input, doctype=nil, entity_filter=nil ) def Text::normalize( input, doctype=nil, entity_filter=nil )
copy = input copy = input.to_s
# Doing it like this rather than in a loop improves the speed # Doing it like this rather than in a loop improves the speed
#copy = copy.gsub( EREFERENCE, '&amp;' ) #copy = copy.gsub( EREFERENCE, '&amp;' )
copy = copy.gsub( "&", "&amp;" ) copy = copy.gsub( "&", "&amp;" )