[1.0.0-alpha2] SvgExtractor: Avoid use of raw filter

Created on 6 August 2024, 3 months ago
Updated 26 August 2024, 3 months ago

Problem/Motivation

content variable, made available in Twig templates by the "svg" extractor plugin, needs |raw filter

This filter must be avoided in Twig, because it may be unsafe.

Proposed resolution

Is it possible to wrap content in a renderable $content = ["#markup" => $content]; before sending it to template ?

Do we need a "preprocess" method in UiIconsExtractorPluginInterface which is taking care of this kind of alterations?

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024