diff options
author | Jamis Buck <jamis@37signals.com> | 2005-11-21 20:43:35 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-11-21 20:43:35 +0000 |
commit | f9b199040c55c26dcd19e4d8077255a24d55b658 (patch) | |
tree | f24feeb8a4f5f115b8ec01ad29a6ecff529dc240 /actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb | |
parent | f1a184fe880c4ff0db1b003f8f4562728809e1bd (diff) | |
download | rails-f9b199040c55c26dcd19e4d8077255a24d55b658.tar.gz rails-f9b199040c55c26dcd19e4d8077255a24d55b658.tar.bz2 rails-f9b199040c55c26dcd19e4d8077255a24d55b658.zip |
Update html-scanner to handle CDATA sections better. Closes #2970. [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3153 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb')
-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 ce9d3b2800..b950e84628 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb @@ -52,6 +52,9 @@ module HTML #:nodoc: if @scanner.scan(/!--/) # comment tag << @scanner.matched tag << (@scanner.scan_until(/--\s*>/) || @scanner.scan_until(/\Z/)) + elsif @scanner.scan(/!\[CDATA\[/) + tag << @scanner.matched + tag << @scanner.scan_until(/\]\]>/) elsif @scanner.scan(/!/) # doctype tag << @scanner.matched tag << consume_quoted_regions |