diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-11 09:41:29 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-11 09:41:29 +0000 |
commit | 7e0022bc8e89cd125f5fe97bc81a169d72d912e9 () | |
tree | e0cfeab987e7ba99ecfcd7e05c23183f96b79305 /lib/rexml/parsers/sax2parser.rb | |
parent | e0fff0d2b83a326363347b2eb508a4e0ae8a4683 (diff) |
* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
Fix wrong "%" position in parameter entity declaration event argument. * test/rexml/parser/test_sax2.rb: Add tests for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rexml/parsers/sax2parser.rb | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -177,12 +177,28 @@ module REXML handle( :characters, copy ) when :entitydecl @entities[ event[1] ] = event[2] if event.size == 3 case event[2] when "SYSTEM" - event[4, 0] = "NDATA" if event.size == 5 when "PUBLIC" - event[5, 0] = "NDATA" if event.size == 6 end handle( event[0], event[1..-1] ) when :processing_instruction, :comment, :attlistdecl, :elementdecl, :cdata, :notationdecl, :xmldecl |