aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorheavysixer <heavysixer@gmail.com>2008-10-25 13:33:39 -0500
committerheavysixer <heavysixer@gmail.com>2008-10-25 13:33:39 -0500
commit14f05140e53f4f58bc86ee08b9a4ba836c14f9be (patch)
tree03b975c55bb42b964edc8a3507f63f92487a42ed /actionpack/lib/action_controller
parent35f29f7ea5ba183e49e26367cc31649ff4bd0e97 (diff)
parent650aa015789c704ca8ea864f1117faf3f404a59b (diff)
downloadrails-14f05140e53f4f58bc86ee08b9a4ba836c14f9be.tar.gz
rails-14f05140e53f4f58bc86ee08b9a4ba836c14f9be.tar.bz2
rails-14f05140e53f4f58bc86ee08b9a4ba836c14f9be.zip
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/node.rb11
1 files changed, 9 insertions, 2 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 472c5b2bae..6c0331636c 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
@@ -150,7 +150,14 @@ module HTML #:nodoc:
end
if scanner.skip(/!\[CDATA\[/)
- scanner.scan_until(/\]\]>/)
+ unless scanner.skip_until(/\]\]>/)
+ if strict
+ raise "expected ]]> (got #{scanner.rest.inspect} for #{content})"
+ else
+ scanner.skip_until(/\Z/)
+ end
+ end
+
return CDATA.new(parent, line, pos, scanner.pre_match.gsub(/<!\[CDATA\[/, ''))
end
@@ -265,7 +272,7 @@ module HTML #:nodoc:
# itself.
class CDATA < Text #:nodoc:
def to_s
- "<![CDATA[#{super}]>"
+ "<![CDATA[#{super}]]>"
end
end