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
This commit is contained in:
Jean-Philippe Lang 2010-12-18 17:21:57 +00:00
parent 93847ae337
commit a7595ec191
1 changed files with 3 additions and 0 deletions

View File

@ -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