##// END OF EJS Templates
Fixed: Wiki section edit escapes code tags inside pre blocks (#9673)....
Jean-Philippe Lang -
r7855:c5cabfe106c9
parent child
Show More
@@ -97,7 +97,7 module Redmine
97 end
97 end
98 end
98 end
99 sections = [before.strip, s.strip, after.strip]
99 sections = [before.strip, s.strip, after.strip]
100 sections.each {|section| smooth_offtags section}
100 sections.each {|section| smooth_offtags_without_code_highlighting section}
101 sections
101 sections
102 end
102 end
103
103
@@ -109,6 +109,7 module Redmine
109 text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
109 text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
110 end
110 end
111
111
112 alias :smooth_offtags_without_code_highlighting :smooth_offtags
112 # Patch to add code highlighting support to RedCloth
113 # Patch to add code highlighting support to RedCloth
113 def smooth_offtags( text )
114 def smooth_offtags( text )
114 unless @pre_list.empty?
115 unless @pre_list.empty?
@@ -279,6 +279,11 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.",
279 # 1
279 # 1
280 "h2. Heading 2
280 "h2. Heading 2
281
281
282 <pre><code class=\"ruby\">
283 def foo
284 end
285 </code></pre>
286
282 Morbi facilisis accumsan orci non pharetra.
287 Morbi facilisis accumsan orci non pharetra.
283
288
284 <pre>
289 <pre>
General Comments 0
You need to be logged in to leave comments. Login now