diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redcloth.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redcloth.rb b/lib/redcloth.rb index 5ed23b8f7..7e0c71839 100644 --- a/lib/redcloth.rb +++ b/lib/redcloth.rb @@ -1134,7 +1134,7 @@ class RedCloth < String ALLOWED_TAGS = %w(redpre pre code) def escape_html_tags(text) - text.gsub!(%r{<((\/?)(\w+))}) {|m| ALLOWED_TAGS.include?($3) ? "<#{$1}" : "<#{$1}" } + text.gsub!(%r{<(\/?(\w+)[^>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "<#{$1}#{'>' if $3}" } end end |