diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-30 14:55:03 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-30 14:55:03 +0000 |
commit | ef5ff1630acbc33ee4a9571b913ada1996d2c4ad (patch) | |
tree | 7bc8dc404dd41e99d18caa7434f7f6fe1ed9cf8e /test/unit | |
parent | f04148695a4a2de305945b00433aa1462d5c901c (diff) | |
download | redmine-ef5ff1630acbc33ee4a9571b913ada1996d2c4ad.tar.gz redmine-ef5ff1630acbc33ee4a9571b913ada1996d2c4ad.zip |
Textile: ignore invalid lang attribute values (#18501).
git-svn-id: http://svn.redmine.org/redmine/trunk@13677 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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 7a58d821d..d331dc28e 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -110,6 +110,20 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase ) end + def test_lang_attribute + assert_html_output( + '*[fr]French*' => '<strong lang="fr">French</strong>', + '*[fr-fr]French*' => '<strong lang="fr-fr">French</strong>', + '*[fr_fr]French*' => '<strong lang="fr_fr">French</strong>' + ) + end + + def test_lang_attribute_should_ignore_invalid_value + assert_html_output( + '*[fr3]French*' => '<strong>[fr3]French</strong>' + ) + end + def test_nested_lists raw = <<-RAW # Item 1 |