]> source.dussan.org Git - redmine.git/commitdiff
Do not recognize invalid textile attributes.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 17 Feb 2012 22:31:01 +0000 (22:31 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 17 Feb 2012 22:31:01 +0000 (22:31 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8902 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redcloth3.rb
test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb

index e15970822f9d82094cfe005d21dffc6cc8721643..f6333b3febf5d66e9b94972630de3134e59fc5f2 100644 (file)
@@ -340,9 +340,9 @@ class RedCloth3 < String
     #
     A_HLGN = /(?:(?:<>|<|>|\=|[()]+)+)/
     A_VLGN = /[\-^~]/
-    C_CLAS = '(?:\([^)]+\))'
-    C_LNGE = '(?:\[[^\[\]]+\])'
-    C_STYL = '(?:\{[^}]+\})'
+    C_CLAS = '(?:\([^")]+\))'
+    C_LNGE = '(?:\[[^"\[\]]+\])'
+    C_STYL = '(?:\{[^"}]+\})'
     S_CSPN = '(?:\\\\\d+)'
     S_RSPN = '(?:/\d+)'
     A = "(?:#{A_HLGN}?#{A_VLGN}?|#{A_VLGN}?#{A_HLGN}?)"
index ce4feb62a5018558626c341ad718521183c5879f..4253b71529a20aacec4230043e296f4b55de1ee3 100644 (file)
@@ -99,7 +99,7 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase
       'p{color:(red)}. text'                 => '<p>text</p>',
       'p{color:red;invalid:blue}. text'      => '<p style="color:red;">text</p>',
       'p{invalid:blue;color:red}. text'      => '<p style="color:red;">text</p>',
-      'p{color:"}. text'                     => '<p>text</p>',
+      'p{color:"}. text'                     => '<p>p{color:"}. text</p>',
       }, false)
   end