diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-17 22:31:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-17 22:31:01 +0000 |
commit | 37575f27feb19396671e6760b578265f841de733 (patch) | |
tree | 41a03e7dbfc4a83a2561298be5bef6414df4805f | |
parent | e484eb2dc8f033c29502e227c932cdc29cc3f9cf (diff) | |
download | redmine-37575f27feb19396671e6760b578265f841de733.tar.gz redmine-37575f27feb19396671e6760b578265f841de733.zip |
Do not recognize invalid textile attributes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8902 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redcloth3.rb | 6 | ||||
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index e15970822..f6333b3fe 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -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}?)" diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index ce4feb62a..4253b7152 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -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 |