Commit a7595ec1 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Adds tests for class attribute parsing on pre/code tags.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4537 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 93847ae3
......@@ -279,6 +279,9 @@ RAW
"<pre class='foo bar'>some text</pre>" => "<pre class='foo bar'>some text</pre>",
'<pre class="foo bar">some text</pre>' => '<pre class="foo bar">some text</pre>',
"<pre onmouseover='alert(1)'>some text</pre>" => "<pre>some text</pre>",
# xss
'<pre><code class=""onmouseover="alert(1)">text</code></pre>' => '<pre><code>text</code></pre>',
'<pre class=""onmouseover="alert(1)">text</pre>' => '<pre>text</pre>',
}
to_test.each { |text, result| assert_equal result, textilizable(text) }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment