Let tables through the message sanitizers

Lexxy imports pasted and Markdown tables, and the tag sanitizer dropped
them with everything in them on render.
This commit is contained in:
Stanko K.R.
2026-09-26 10:04:38 +02:00
parent 8bdff5ddc6
commit 1694accbf8
3 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ module ContentFilters
# * SanitizeTags strips disallowed markup from the message body
# * Action Text sanitizes the rendered content (lib/rails_ext/action_text_allowed_tags.rb)
# * auto_link re-sanitizes the final html (MessagesHelper#message_presentation)
EDITOR_FORMATTING_TAGS = %w[ s u mark ]
EDITOR_FORMATTING_TAGS = %w[ s u mark table thead tbody tfoot tr th td ]
EDITOR_FORMATTING_ATTRIBUTES = %w[ data-language ]
TextMessagePresentationFilters = ActionText::Content::Filters.new(RemoveSoloUnfurledLinkText, SanitizeTags, SanitizeAttributes)