History

Avoid stripping some empty SVG elements

Calum Smith committed 1 year ago

Commit d877a451 parent bf4e9011 file · +1 −1Browse files

Unified · Split

lib/docs/filters/core/clean_text.rb+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2 2
3module Docs3module Docs
4 class CleanTextFilter < Filter4 class CleanTextFilter < Filter
5 EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace)(\w+)[^>]*>[[:space:]]*<\/\1>/5 EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace|rect|path|ellipse|line|polyline)(\w+)[^>]*>[[:space:]]*<\/\1>/
6 6
7 def call7 def call
8 return html if context[:clean_text] == false8 return html if context[:clean_text] == false