summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb9
1 files changed, 8 insertions, 1 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 65a91b20a..de0e5086e 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -160,12 +160,19 @@ EXPECTED
assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '')
end
- def test_escaping
+ def test_should_escape_unallowed_tags
assert_html_output(
'this is a <script>' => 'this is a &lt;script&gt;'
)
end
+ def test_should_escape_less_than_signs
+ assert_html_output(
+ '<' => '&lt;',
+ '1 < 2' => '1 &lt; 2'
+ )
+ end
+
def test_use_of_backslashes_followed_by_numbers_in_headers
assert_html_output({
'h1. 2009\02\09' => '<h1>2009\02\09</h1>'