Project

General

Profile

Defect #31021 » 0002-Fullwidth-characters-enclosed-in-lt-and-gt.patch

Yuichi HARADA, 2019-03-28 05:18

View differences:

lib/redmine/wiki_formatting/textile/redcloth3.rb
1215 1215

  
1216 1216
    ALLOWED_TAGS = %w(redpre pre code kbd notextile)
1217 1217
    def escape_html_tags(text)
1218
      text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "&lt;#{$1}#{'&gt;' unless $3.blank?}" }
1218
      text.gsub!(%r{<(\/?([!_[[:alnum:]]]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "&lt;#{$1}#{'&gt;' unless $3.blank?}" }
1219 1219
    end
1220 1220
end
(4-4/5)