diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-14 15:01:05 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-14 15:01:05 +0000 |
| commit | c582a29af2bee8b9d42d5fe07e9c4fa8837169fc (patch) | |
| tree | de92b869f149ac30947e53259092cc331f02de7c | |
| parent | 0317ded8fbc3011e057a0a7d4cbfeb8ddeae9b79 (diff) | |
| download | ruby-c582a29af2bee8b9d42d5fe07e9c4fa8837169fc.tar.gz ruby-c582a29af2bee8b9d42d5fe07e9c4fa8837169fc.tar.xz ruby-c582a29af2bee8b9d42d5fe07e9c4fa8837169fc.zip | |
* lib/rss/parser.rb (RSS::ListenerMixin::tag_end):
fixed invalid namespace handling bug.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/rss/parser.rb | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Feb 14 23:58:17 2005 Kouhei Sutou <kou@cozmixng.org> + + * lib/rss/parser.rb (RSS::ListenerMixin::tag_end): + fixed invalid namespace handling bug. + Mon Feb 14 13:12:38 2005 GOTOU Yuuzou <gotoyuzo@notwork.org> * ext/openssl/lib/openssl/ssl.rb diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index 1030c8f5d..fb6c55fb7 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -229,7 +229,7 @@ module RSS ns = @ns_stack.last.dup attrs = {} attributes.each do |n, v| - if n =~ /\Axmlns:?/ + if /\Axmlns(?:\z|:)/ =~ n ns[$POSTMATCH] = v else attrs[n] = v @@ -256,6 +256,7 @@ module RSS tags = @tag_stack.pop pr = @proc_stack.pop pr.call(text, tags) unless pr.nil? + @ns_stack.pop end def text(data) |
