summaryrefslogtreecommitdiff
path: root/lib/rexml
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-10 03:48:30 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-10 03:48:30 +0000
commit265c2f8eb896110d93e518352a7d4254d4ab8227 (patch)
tree574cfc84c27509d547d10c735efd4fb9ef168ad3 /lib/rexml
parent43b082d90c135d45f8157fcfd1cee2fedbb5d411 (diff)
* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
Fix wrong constant name. "]>" pattern match is the same but it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r--lib/rexml/parsers/baseparser.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb
index e937b169be..5a0074e9f7 100644
--- a/lib/rexml/parsers/baseparser.rb
+++ b/lib/rexml/parsers/baseparser.rb
@@ -43,6 +43,7 @@ module REXML
REFERENCE_RE = /#{REFERENCE}/
DOCTYPE_START = /\A\s*<!DOCTYPE\s/um
+ DOCTYPE_END = /\A\s*\]\s*>/um
DOCTYPE_PATTERN = /\s*<!DOCTYPE\s+(.*?)(\[|>)/um
ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\4/um
COMMENT_START = /\A<!--/u
@@ -322,9 +323,9 @@ module REXML
raise REXML::ParseException.new( "error parsing notation: no matching pattern", @source )
end
return [ :notationdecl, *vals ]
- when CDATA_END
+ when DOCTYPE_END
@document_status = :after_doctype
- @source.match( CDATA_END, true )
+ @source.match( DOCTYPE_END, true )
return [ :end_doctype ]
end
end