aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/vendor
diff options
context:
space:
mode:
authorBruno Michel <bmichel@menfin.info>2010-06-26 19:00:57 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-28 11:40:27 +0200
commit2002e5877efa40b336b70b707670e734c6389958 (patch)
tree88fda5bcd8dde17b6e1fbe76768b73a01539aec4 /actionpack/lib/action_controller/vendor
parentdd8b7417a9b793b7780bf5ca5e04b1c05ac3a8f9 (diff)
downloadrails-2002e5877efa40b336b70b707670e734c6389958.tar.gz
rails-2002e5877efa40b336b70b707670e734c6389958.tar.bz2
rails-2002e5877efa40b336b70b707670e734c6389958.zip
Strip_tags never ending attribute should not raise a TypeError [#4870 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller/vendor')
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/node.rb1
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
index 6c0331636c..a874519978 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
@@ -177,6 +177,7 @@ module HTML #:nodoc:
case text
when "\\" then
value << text
+ break if scanner.eos?
value << scanner.getch
when delim
break
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 064ff3724d..240dc1890f 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
@@ -96,6 +96,7 @@ module HTML #:nodoc:
while match = @scanner.scan_until(/[\\#{delim}]/)
text << match
break if @scanner.matched == delim
+ break if @scanner.eos?
text << @scanner.getch # skip the escaped character
end
end