diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting/textile/redcloth3.rb | 5 |
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 |