fix(options): use |escape() instead of |e() — sandbox only allows 'escape'
The twig sandbox policy (application/config/internal.php sandboxConfig) allows the filter name 'escape' but not its alias 'e', so the S2 escaping in options/options.twig threw SecurityNotAllowedFilterError (500) on the admin theme-options page. |escape() is the same filter/callable; all 16 theme twig templates now compile under the real sandbox policy (verified locally). Core-side wish filed: FEATURE_REQUEST_sandbox_allow_e_alias.md (local-only). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
1d490b308e
commit
3c38b4712b
1 changed files with 2 additions and 2 deletions
|
|
@ -101,10 +101,10 @@
|
|||
{% for image in templateConfiguration.imageFileList %}
|
||||
{% if image.group != imgGroup %}
|
||||
{% if imgGroup != '' %}{% set imageOptions = imageOptions ~ '</optgroup>' %}{% endif %}
|
||||
{% set imageOptions = imageOptions ~ '<optgroup label="' ~ image.group|e('html_attr') ~ '">' %}
|
||||
{% set imageOptions = imageOptions ~ '<optgroup label="' ~ image.group|escape('html_attr') ~ '">' %}
|
||||
{% set imgGroup = image.group %}
|
||||
{% endif %}
|
||||
{% set imageOptions = imageOptions ~ '<option data-lightbox-src="' ~ image.preview|e('html_attr') ~ '" value="' ~ image.filepath|e('html_attr') ~ '">' ~ image.filename|e('html') ~ '</option>' %}
|
||||
{% set imageOptions = imageOptions ~ '<option data-lightbox-src="' ~ image.preview|escape('html_attr') ~ '" value="' ~ image.filepath|escape('html_attr') ~ '">' ~ image.filename|escape('html') ~ '</option>' %}
|
||||
{% endfor %}
|
||||
{% if imgGroup != '' %}{% set imageOptions = imageOptions ~ '</optgroup>' %}{% endif %}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue