summaryrefslogtreecommitdiff
path: root/lib/rexml
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-26 14:17:24 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-26 14:17:24 +0000
commit75a138732efe3c19e99154eb3f9795d5f93c26ec (patch)
tree0a7da0e7e630d1bde756d47e1f6d918ab1d07c10 /lib/rexml
parent41f864faab6f1cdd8ad7e88c9c89fea200d030d2 (diff)
* lib/rexml/parsers/streamparser.rb
(REXML::Parsers::StreamParser#parse): Add "entity" event support to listener. [Bug #8689] [ruby-dev:47542] Reported by Ippei Obayashi. * test/rexml/test_stream.rb (StreamTester#entity): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r--lib/rexml/parsers/streamparser.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rexml/parsers/streamparser.rb b/lib/rexml/parsers/streamparser.rb
index 073fcc2..9456ea8 100644
--- a/lib/rexml/parsers/streamparser.rb
+++ b/lib/rexml/parsers/streamparser.rb
@@ -38,6 +38,10 @@ module REXML
@listener.send( event[0].to_s, *event[1..-1] )
when :entitydecl, :notationdecl
@listener.send( event[0].to_s, event[1..-1] )
+ when :externalentity
+ entity_reference = event[1]
+ content = entity_reference.gsub(/\A%|;\z/, "")
+ @listener.entity(content)
end
end
end