Do not recognize invalid textile attributes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8902 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-17 22:31:01 +00:00
parent e484eb2dc8
commit 37575f27fe
2 changed files with 4 additions and 4 deletions

View File

@ -340,9 +340,9 @@ class RedCloth3 < String
# #
A_HLGN = /(?:(?:<>|<|>|\=|[()]+)+)/ A_HLGN = /(?:(?:<>|<|>|\=|[()]+)+)/
A_VLGN = /[\-^~]/ A_VLGN = /[\-^~]/
C_CLAS = '(?:\([^)]+\))' C_CLAS = '(?:\([^")]+\))'
C_LNGE = '(?:\[[^\[\]]+\])' C_LNGE = '(?:\[[^"\[\]]+\])'
C_STYL = '(?:\{[^}]+\})' C_STYL = '(?:\{[^"}]+\})'
S_CSPN = '(?:\\\\\d+)' S_CSPN = '(?:\\\\\d+)'
S_RSPN = '(?:/\d+)' S_RSPN = '(?:/\d+)'
A = "(?:#{A_HLGN}?#{A_VLGN}?|#{A_VLGN}?#{A_HLGN}?)" A = "(?:#{A_HLGN}?#{A_VLGN}?|#{A_VLGN}?#{A_HLGN}?)"

View File

@ -99,7 +99,7 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase
'p{color:(red)}. text' => '<p>text</p>', 'p{color:(red)}. text' => '<p>text</p>',
'p{color:red;invalid:blue}. text' => '<p style="color:red;">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{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) }, false)
end end