mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-27 01:27:13 +00:00
Merged r4468 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4538 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f4ada319d1
commit
cb30fa49fc
@ -1078,7 +1078,7 @@ class RedCloth3 < String
|
||||
line = "<redpre##{ @pre_list.length }>"
|
||||
first.match(/<#{ OFFTAGS }([^>]*)>/)
|
||||
tag = $1
|
||||
$2.to_s.match(/(class\=\S+)/i)
|
||||
$2.to_s.match(/(class\=("[^"]+"|'[^']+'))/i)
|
||||
tag << " #{$1}" if $1
|
||||
@pre_list << "<#{ tag }>#{ aftertag }"
|
||||
end
|
||||
|
||||
@ -284,6 +284,9 @@ RAW
|
||||
"<!-- opening comment" => "<p><!-- opening comment</p>",
|
||||
# remove attributes except class
|
||||
"<pre class='foo'>some text</pre>" => "<pre class='foo'>some text</pre>",
|
||||
'<pre class="foo">some text</pre>' => '<pre class="foo">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 class="foo bar">some text</pre>',
|
||||
"<pre onmouseover='alert(1)'>some text</pre>" => "<pre>some text</pre>",
|
||||
}
|
||||
to_test.each { |text, result| assert_equal result, textilizable(text) }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user