##// END OF EJS Templates
Fixes html escaping....
Jean-Philippe Lang -
r1899:2e7e26fbb4c8
parent child
Show More
@@ -1045,17 +1045,17 class RedCloth3 < String
1045 1045 codepre += 1
1046 1046 used_offtags[offtag] = true
1047 1047 if codepre - used_offtags.length > 0
1048 htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
1048 htmlesc( line, :NoQuotes )
1049 1049 @pre_list.last << line
1050 1050 line = ""
1051 1051 else
1052 htmlesc( aftertag, :NoQuotes ) if aftertag and not used_offtags['notextile']
1052 htmlesc( aftertag, :NoQuotes ) if aftertag
1053 1053 line = "<redpre##{ @pre_list.length }>"
1054 1054 @pre_list << "#{ $3 }#{ aftertag }"
1055 1055 end
1056 1056 elsif $1 and codepre > 0
1057 1057 if codepre - used_offtags.length > 0
1058 htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
1058 htmlesc( line, :NoQuotes )
1059 1059 @pre_list.last << line
1060 1060 line = ""
1061 1061 end
@@ -190,6 +190,7 class ApplicationHelperTest < HelperTestCase
190 190 to_test = {
191 191 "<pre>preformatted text</pre>" => "<pre>preformatted text</pre>",
192 192 "<notextile>no *textile* formatting</notextile>" => "no *textile* formatting",
193 "<notextile>this is <tag>a tag</tag></notextile>" => "this is &lt;tag&gt;a tag&lt;/tag&gt;"
193 194 }
194 195 to_test.each { |text, result| assert_equal result, textilizable(text) }
195 196 end
General Comments 0
You need to be logged in to leave comments. Login now