Fixed: Wiki section edit escapes code tags inside pre blocks (#9673).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7975 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
622b3ae61c
commit
c5cabfe106
@ -97,7 +97,7 @@ module Redmine
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
sections = [before.strip, s.strip, after.strip]
|
sections = [before.strip, s.strip, after.strip]
|
||||||
sections.each {|section| smooth_offtags section}
|
sections.each {|section| smooth_offtags_without_code_highlighting section}
|
||||||
sections
|
sections
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -109,6 +109,7 @@ module Redmine
|
|||||||
text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
|
text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias :smooth_offtags_without_code_highlighting :smooth_offtags
|
||||||
# Patch to add code highlighting support to RedCloth
|
# Patch to add code highlighting support to RedCloth
|
||||||
def smooth_offtags( text )
|
def smooth_offtags( text )
|
||||||
unless @pre_list.empty?
|
unless @pre_list.empty?
|
||||||
|
@ -279,6 +279,11 @@ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.",
|
|||||||
# 1
|
# 1
|
||||||
"h2. Heading 2
|
"h2. Heading 2
|
||||||
|
|
||||||
|
<pre><code class=\"ruby\">
|
||||||
|
def foo
|
||||||
|
end
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
Morbi facilisis accumsan orci non pharetra.
|
Morbi facilisis accumsan orci non pharetra.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user