From 75ba1d6ac49db4847877c41f50da48d18423c15b Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 6 Apr 2010 00:22:04 +0000 Subject: [PATCH] Fix previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/parsers/baseparser.rb | 3 ++- lib/rss/parser.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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]