diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index f108ea2d32..053ac6441e 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -32,10 +32,11 @@ module REXML EXTENDER = '' # TODO NCNAME_STR= "[#{LETTER}_:][-.\w:#{COMBININGCHAR}#{EXTENDER}]*" + NCNAME_STR= "[#{LETTER}_:][-[:alnum:]._:#{COMBININGCHAR}#{EXTENDER}]*" NAME_STR= "(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})" UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" - NAMECHAR = '[\-\w:]' + NAMECHAR = '[\-\w\.:]' NAME = "([\\w:]#{NAMECHAR}*)" NMTOKEN = "(?:#{NAMECHAR})+" NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*" diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index 1a9e71ea57..c426a187b8 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -417,7 +417,7 @@ module RSS end end - NAMESPLIT = /^(?:([\w:][-\w\d.]*):)?([\w:][-\w\d.]*)/ + NAMESPLIT = /^(?:([\w:][-\w.]*):)?([\w:][-\w.]*)/ def split_name(name) name =~ NAMESPLIT [$1 || '', $2]