diff --git a/ChangeLog b/ChangeLog index b4c9318a96..444a30ac4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +Wed Jan 27 22:16:00 2010 Kirk Haines + + * 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 - * 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 diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb index 9804aa710b..f273319758 100644 --- a/lib/rexml/text.rb +++ b/lib/rexml/text.rb @@ -286,7 +286,7 @@ module REXML EREFERENCE = /&(?!#{Entity::NAME};)/ # Escapes all possible entities 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 #copy = copy.gsub( EREFERENCE, '&' ) copy = copy.gsub( "&", "&" )