]> source.dussan.org Git - redmine.git/commitdiff
Fixes html escaping.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 23 Sep 2008 17:03:51 +0000 (17:03 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 23 Sep 2008 17:03:51 +0000 (17:03 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1901 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redcloth3.rb
test/unit/helpers/application_helper_test.rb

index a5e63262c442d52b8f8ba18b1028bb110a3a9295..cbca2bfd1ac2493f995e9ff8a4a95b3faff9269f 100644 (file)
@@ -1045,17 +1045,17 @@ class RedCloth3 < String
                     codepre += 1
                     used_offtags[offtag] = true
                     if codepre - used_offtags.length > 0
-                        htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
+                        htmlesc( line, :NoQuotes )
                         @pre_list.last << line
                         line = ""
                     else
-                        htmlesc( aftertag, :NoQuotes ) if aftertag and not used_offtags['notextile']
+                        htmlesc( aftertag, :NoQuotes ) if aftertag
                         line = "<redpre##{ @pre_list.length }>"
                         @pre_list << "#{ $3 }#{ aftertag }"
                     end
                 elsif $1 and codepre > 0
                     if codepre - used_offtags.length > 0
-                        htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
+                        htmlesc( line, :NoQuotes )
                         @pre_list.last << line
                         line = ""
                     end
index 35e26ebd4ed1ca2b38f5d12153f1acec3efbe262..14ca3cc64cc71e969c54f11f547400e5c45b0d56 100644 (file)
@@ -190,6 +190,7 @@ class ApplicationHelperTest < HelperTestCase
     to_test = {
       "<pre>preformatted text</pre>" => "<pre>preformatted text</pre>",
       "<notextile>no *textile* formatting</notextile>" => "no *textile* formatting",
+      "<notextile>this is <tag>a tag</tag></notextile>" => "this is &lt;tag&gt;a tag&lt;/tag&gt;"
     }
     to_test.each { |text, result| assert_equal result, textilizable(text) }
   end