diff --git a/vendor/plugins/maruku/lib/maruku/string_utils.rb b/vendor/plugins/maruku/lib/maruku/string_utils.rb index 35d01a32..1bba7d57 100644 --- a/vendor/plugins/maruku/lib/maruku/string_utils.rb +++ b/vendor/plugins/maruku/lib/maruku/string_utils.rb @@ -53,7 +53,9 @@ module MaRuKu; module Strings keys[:data] = $' headers = $1 headers.split("\n").each do |l| - k, v = l.split(':') +# Fails if there are other ':' characters. +# k, v = l.split(':') + k, v = l.split(':', 2) k, v = normalize_key_and_value(k, v) k = k.to_sym # puts "K = #{k}, V=#{v}" diff --git a/vendor/plugins/rexml/lib/rexml/attribute.rb b/vendor/plugins/rexml/lib/rexml/attribute.rb index 17ced44c..9dc0424d 100644 --- a/vendor/plugins/rexml/lib/rexml/attribute.rb +++ b/vendor/plugins/rexml/lib/rexml/attribute.rb @@ -17,8 +17,6 @@ module REXML attr_writer :normalized PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um - NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um - # Constructor. # FIXME: The parser doesn't catch illegal characters in attributes # @@ -150,7 +148,7 @@ module REXML @element = element if @normalized - Text.check( @normalized, NEEDS_A_SECOND_CHECK, doctype ) + Text.check( @normalized, Text::NEEDS_A_SECOND_CHECK, doctype ) end self diff --git a/vendor/plugins/rexml/lib/rexml/doctype.rb b/vendor/plugins/rexml/lib/rexml/doctype.rb index e90c12d5..35beabc5 100644 --- a/vendor/plugins/rexml/lib/rexml/doctype.rb +++ b/vendor/plugins/rexml/lib/rexml/doctype.rb @@ -188,7 +188,7 @@ module REXML # Method contributed by Henrik Martensson def strip_quotes(quoted_string) - quoted_string =~ /^[\'\"].*[\ยด\"]$/ ? + quoted_string =~ /^[\'\"].*[\'\"]$/ ? quoted_string[1, quoted_string.length-2] : quoted_string end diff --git a/vendor/plugins/rexml/lib/rexml/source.rb b/vendor/plugins/rexml/lib/rexml/source.rb index 42bfc7d0..d4335138 100644 --- a/vendor/plugins/rexml/lib/rexml/source.rb +++ b/vendor/plugins/rexml/lib/rexml/source.rb @@ -147,7 +147,7 @@ module REXML # the XML spec. If there is one, we can determine the encoding from # it. @buffer = "" - str = @source.read( 2 ) + str = @source.read( 2 ) || '' if encoding self.encoding = encoding elsif str[0,2] == "\xfe\xff" @@ -161,7 +161,7 @@ module REXML else @line_break = ">" end - super str+@source.readline( @line_break ) + super( @source.eof? ? str : str+@source.readline( @line_break ) ) end def scan(pattern, cons=false)