aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-28 19:45:32 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-28 19:45:32 +0000
commitc57254d44930f43ccf300e8906bd46bd5aaf8ed3 (patch)
tree714ef6edded6cb6b0c4e400d03723bb7073e75b9 /actionpack/lib
parentbdd88810c1edf8289801f88170eb5c9659b2f774 (diff)
downloadrails-c57254d44930f43ccf300e8906bd46bd5aaf8ed3.tar.gz
rails-c57254d44930f43ccf300e8906bd46bd5aaf8ed3.tar.bz2
rails-c57254d44930f43ccf300e8906bd46bd5aaf8ed3.zip
Fixed HTML::Tokenizer (used in sanitize helper) didnt handle unclosed CDATA tags (closes #10071) [esad, packagethief]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb2
1 files changed, 1 insertions, 1 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..602411ed37 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
@@ -54,7 +54,7 @@ module HTML #:nodoc:
tag << (@scanner.scan_until(/--\s*>/) || @scanner.scan_until(/\Z/))
elsif @scanner.scan(/!\[CDATA\[/)
tag << @scanner.matched
- tag << @scanner.scan_until(/\]\]>/)
+ tag << (@scanner.scan_until(/\]\]>/) || @scanner.scan_until(/\Z/))
elsif @scanner.scan(/!/) # doctype
tag << @scanner.matched
tag << consume_quoted_regions