- Issue created by @reinfate
- Merge request !57Issue #3534628: Message partials are filtered without text format → (Open) created by reinfate
All message partials are rendered as "processed text" with text format, here \Drupal\message\Entity\MessageTemplate::getText
. The processed text and rendering process already handle removing unallowed tags, attributes, etc. But \Drupal\message\MessageViewBuilder::view
wraps partials as plain string markup. Because of that, partials go through another XSS filter, which ignores the configured text format, since it doesn't know about it, potentially removing allowed tags/attributes.
\Drupal\Core\Render\Renderer::ensureMarkupIsSafe
Wrap the partials in ViewBuilder in the \Drupal\filter\Render\FilteredMarkup
class.
The processed text element does the same, so we can consider that the template is safe. Reference: \Drupal\filter\Element\ProcessedText::preRenderText
-
-
-
-
Active
1.0
Code