Blame rubygem-actionpack-2.2.x-strip_tag-for-nonprintable.patch
|
|
98453fa |
From 785281ade8c2347614525e9aceb5e62c80eec6f8 Mon Sep 17 00:00:00 2001
|
|
|
98453fa |
From: Gabe da Silveira <gabe@websaviour.com>
|
|
|
98453fa |
Date: Mon, 16 Nov 2009 21:17:35 -0800
|
|
|
98453fa |
Subject: [PATCH] Make sure strip_tags removes tags which start with a non-printable character
|
|
|
98453fa |
|
|
|
98453fa |
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
98453fa |
---
|
|
|
98453fa |
.../vendor/html-scanner/html/node.rb | 2 +-
|
|
|
ab75d7b |
.../test/controller/html-scanner/sanitizer_test.rb | 1 +
|
|
|
98453fa |
2 files changed, 2 insertions(+), 1 deletions(-)
|
|
|
98453fa |
|
|
|
98453fa |
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
|
|
|
98453fa |
index 6c03316..0cd05d8 100644
|
|
|
98453fa |
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
|
|
|
98453fa |
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
|
|
|
98453fa |
@@ -162,7 +162,7 @@ module HTML #:nodoc:
|
|
|
98453fa |
end
|
|
|
98453fa |
|
|
|
98453fa |
closing = ( scanner.scan(/\//) ? :close : nil )
|
|
|
98453fa |
- return Text.new(parent, line, pos, content) unless name = scanner.scan(/[\w:-]+/)
|
|
|
98453fa |
+ return Text.new(parent, line, pos, content) unless name = scanner.scan(/[-:\w\x00-\x09\x0b-\x0c\x0e-\x1f]+/)
|
|
|
98453fa |
name.downcase!
|
|
|
98453fa |
|
|
|
98453fa |
unless closing
|