diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-08-10 03:24:40 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-08-10 03:24:40 +0000 |
commit | 303d379dadaf8c5b0b4518173b2689b003c213a8 (patch) | |
tree | 725143749e8aefffbeab198dcb744724b7d65dc0 /actionpack/lib/action_controller/vendor/html-scanner | |
parent | 18a4cc1bd2d260c6905b58dee61e7b3ac88f0a6b (diff) | |
download | rails-303d379dadaf8c5b0b4518173b2689b003c213a8.tar.gz rails-303d379dadaf8c5b0b4518173b2689b003c213a8.tar.bz2 rails-303d379dadaf8c5b0b4518173b2689b003c213a8.zip |
Ignore processing instructions when parsing html
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7300 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/vendor/html-scanner')
-rw-r--r-- | actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb index b950e84628..22df33afbe 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb @@ -58,6 +58,9 @@ module HTML #:nodoc: elsif @scanner.scan(/!/) # doctype tag << @scanner.matched tag << consume_quoted_regions + elsif @scanner.scan(/\?/) # processing instructions, drop them + tag = '' + @scanner.scan_until(/\/>/) else tag << consume_quoted_regions end |