summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-03-17 03:55:24 +0000
committerGo MAEDA <maeda@farend.jp>2022-03-17 03:55:24 +0000
commitb51d40fe38f4f508edd03323b1d3dc30bc9931e3 (patch)
tree6b5aecd21f6a9cde397f1fca9270aee49ff10622 /lib/redmine/wiki_formatting
parent2d6f552599d0e632953372b7a942a5eaab099631 (diff)
downloadredmine-b51d40fe38f4f508edd03323b1d3dc30bc9931e3.tar.gz
redmine-b51d40fe38f4f508edd03323b1d3dc30bc9931e3.zip
Comments for Textile text formatting (#20511).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21457 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index 2816e1c90..dbb919ff1 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -298,6 +298,7 @@ class RedCloth3 < String
@pre_list = []
rip_offtags text
no_textile text
+ remove_html_comments text
escape_html_tags text
# need to do this before #hard_break and #blocks
block_textile_quotes text unless @lite_mode
@@ -1217,4 +1218,8 @@ class RedCloth3 < String
end
end
end
+
+ def remove_html_comments(text)
+ text.gsub!(/<!--[\s\S]*?-->/, '')
+ end
end