From d66c8faa9bc5521bc6659532542b13a0f05f0cd1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 28 Nov 2011 22:08:15 +0000 Subject: Fixed: Wiki section edit escapes pre tags inside pre blocks (#9673). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7976 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/redcloth3.rb') diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index 8a33943dc..d09804f41 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -1058,7 +1058,7 @@ class RedCloth3 < String end end - def rip_offtags( text, escape_aftertag=true ) + def rip_offtags( text, escape_aftertag=true, escape_line=true ) if text =~ /<.*>/ ## strip and encode
 content
             codepre, used_offtags = 0, {}
@@ -1068,7 +1068,7 @@ class RedCloth3 < String
                     codepre += 1
                     used_offtags[offtag] = true
                     if codepre - used_offtags.length > 0
-                        htmlesc( line, :NoQuotes )
+                        htmlesc( line, :NoQuotes ) if escape_line
                         @pre_list.last << line
                         line = ""
                     else
@@ -1086,7 +1086,7 @@ class RedCloth3 < String
                     end
                 elsif $1 and codepre > 0
                     if codepre - used_offtags.length > 0
-                        htmlesc( line, :NoQuotes )
+                        htmlesc( line, :NoQuotes ) if escape_line
                         @pre_list.last << line
                         line = ""
                     end
-- 
cgit v1.2.3