summaryrefslogtreecommitdiffstats
path: root/test/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-09-18 07:45:03 +0000
committerGo MAEDA <maeda@farend.jp>2023-09-18 07:45:03 +0000
commitba181c732806eed652e8b9990f22621c19590d77 (patch)
tree7681ceda324d9acce7d4b8ab38d6b707a4f9f5d1 /test/helpers
parent5e07a7241392a82586054613896e4da73069bcbb (diff)
downloadredmine-ba181c732806eed652e8b9990f22621c19590d77.tar.gz
redmine-ba181c732806eed652e8b9990f22621c19590d77.zip
HTML-escape the entire tag content of escaped HTML tags in textile (#38807).
Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@22302 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers')
-rw-r--r--test/helpers/application_helper_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb
index ddc55dcb8..a9e3b3a74 100644
--- a/test/helpers/application_helper_test.rb
+++ b/test/helpers/application_helper_test.rb
@@ -1296,12 +1296,13 @@ class ApplicationHelperTest < Redmine::HelperTest
def test_html_tags
to_test = {
"<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>",
+ "<div class=\"bold\">content</div>" => "<p>&lt;div class=&quot;bold&quot;&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>",
- "<pre><div>content</div></pre>" => "<pre>&lt;div&gt;content&lt;/div&gt;</pre>",
+ "<pre><div class=\"foo\">content</div></pre>" => "<pre>&lt;div class=\"foo\"&gt;content&lt;/div&gt;</pre>",
+ "<pre><div class=\"<foo\">content</div></pre>" => "<pre>&lt;div class=\"&lt;foo\"&gt;content&lt;/div&gt;</pre>",
"<!-- opening comment" => "<p>&lt;!-- opening comment</p>",
# remove attributes including class
"<pre class='foo'>some text</pre>" => "<pre>some text</pre>",