Replace closing html tags with html entity (#910).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1348 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-04-13 12:45:17 +00:00
parent 8b9fb29d95
commit 97fe797ad3
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -134,8 +134,9 @@ class ApplicationHelperTest < HelperTestCase
def test_html_tags
to_test = {
"<div>content</div>" => "<p>&lt;div>content&lt;/div></p>",
"<script>some script;</script>" => "<p>&lt;script>some script;&lt;/script></p>",
"<div>content</div>" => "<p>&lt;div&gt;content&lt;/div&gt;</p>",
"<div class=\"bold\">content</div>" => "<p>&lt;div class=\"bold\"&gt;content&lt;/div&gt;</p>",
"<script>some script;</script>" => "<p>&lt;script&gt;some script;&lt;/script&gt;</p>",
# do not escape pre/code tags
"<pre>\nline 1\nline2</pre>" => "<pre>\nline 1\nline2</pre>",
"<pre><code>\nline 1\nline2</code></pre>" => "<pre><code>\nline 1\nline2</code></pre>",