aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/vendor/html-scanner
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-08-10 03:24:40 +0000
committerMichael Koziarski <michael@koziarski.com>2007-08-10 03:24:40 +0000
commit303d379dadaf8c5b0b4518173b2689b003c213a8 (patch)
tree725143749e8aefffbeab198dcb744724b7d65dc0 /actionpack/lib/action_controller/vendor/html-scanner
parent18a4cc1bd2d260c6905b58dee61e7b3ac88f0a6b (diff)
downloadrails-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.rb3
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