Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 294797 | Differences between
and this patch

Collapse All | Expand All

(-)a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb (-1 / +1 lines)
Lines 162-168 module HTML #:nodoc: Link Here
162
          end
162
          end
163
          
163
          
164
          closing = ( scanner.scan(/\//) ? :close : nil )
164
          closing = ( scanner.scan(/\//) ? :close : nil )
165
          return Text.new(parent, line, pos, content) unless name = scanner.scan(/[\w:-]+/)
165
          return Text.new(parent, line, pos, content) unless name = scanner.scan(/[-:\w\x00-\x09\x0b-\x0c\x0e-\x1f]+/)
166
          name.downcase!
166
          name.downcase!
167
  
167
  
168
          unless closing
168
          unless closing
(-)a/actionpack/test/controller/html-scanner/sanitizer_test.rb (-1 / +1 lines)
Lines 19-24 class SanitizerTest < Test::Unit::TestCase Link Here
19
    assert_equal "This has a  here.", sanitizer.sanitize("This has a <!-- comment --> here.")
19
    assert_equal "This has a  here.", sanitizer.sanitize("This has a <!-- comment --> here.")
20
    assert_equal "This has a  here.", sanitizer.sanitize("This has a <![CDATA[<section>]]> here.")
20
    assert_equal "This has a  here.", sanitizer.sanitize("This has a <![CDATA[<section>]]> here.")
21
    assert_equal "This has an unclosed ", sanitizer.sanitize("This has an unclosed <![CDATA[<section>]] here...")
21
    assert_equal "This has an unclosed ", sanitizer.sanitize("This has an unclosed <![CDATA[<section>]] here...")
22
    assert_equal "non printable char is a tag", sanitizer.sanitize("<\x07a href='/hello'>non printable char is a tag</a>")
22
    [nil, '', '   '].each { |blank| assert_equal blank, sanitizer.sanitize(blank) }
23
    [nil, '', '   '].each { |blank| assert_equal blank, sanitizer.sanitize(blank) }
23
  end
24
  end
24
25
25
- 

Return to bug 294797