Project

General

Profile

Defect #3072 ยป yh.patch

Yuval Hager, 2009-04-06 10:24

View differences:

lib/redcloth3.rb (working copy)
end
end
ALLOWED_TAGS = %w(redpre pre code notextile)
ALLOWED_TAGS = %w(redpre pre code notextile div)
def escape_html_tags(text)
text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "&lt;#{$1}#{'&gt;' unless $3.blank?}" }
    (1-1/1)