summaryrefslogtreecommitdiff
path: root/lib/rexml
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-26 14:36:30 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-26 14:36:30 +0000
commit4e44eeaeb103f9ad43acc991918a4ae3cd1049cf (patch)
treed3a6f08ef29bd0e84b8ca3f47ea762295f4fb076 /lib/rexml
parent562648e48ca42e6a263d52677638683add7327a6 (diff)
* lib/rexml/text.rb (REXML::Text.normalize): Fix a bug that all
entity filters are ignored. [ruby-dev:47278] [Bug #8302] Patch by Ippei Obayashi. Thanks!!! * test/rexml/test_entity.rb (EntityTester#test_entity_filter): Add a test of the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r--lib/rexml/text.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb
index 6624e2a..23b17a7 100644
--- a/lib/rexml/text.rb
+++ b/lib/rexml/text.rb
@@ -368,7 +368,7 @@ module REXML
doctype.entities.each_value do |entity|
copy = copy.gsub( entity.value,
"&#{entity.name};" ) if entity.value and
- not( entity_filter and entity_filter.include?(entity) )
+ not( entity_filter and entity_filter.include?(entity.name) )
end
else
# Replace all ampersands that aren't part of an entity