Skip to content
Snippets Groups Projects
Commit 8b171543 authored by Nicole Cordes's avatar Nicole Cordes Committed by Helmut Hummel
Browse files

[BUGFIX] Allow span tags in fieldInformation return

To be able to improve the layout of field information, the span tag is
added to the list of allowed tags in html.

Resolves: #84633
Releases: master, 8.7
Change-Id: If3a60002cb8b7a7473e96820bdb35ac9c8111bab
Reviewed-on: https://review.typo3.org/56573


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
parent c6e4598d
Branches
Tags
No related merge requests found
...@@ -66,7 +66,7 @@ class FieldInformation extends AbstractNode ...@@ -66,7 +66,7 @@ class FieldInformation extends AbstractNode
$options['renderData']['fieldInformationOptions'] = $orderedFieldInformationConfiguration['options'] ?? []; $options['renderData']['fieldInformationOptions'] = $orderedFieldInformationConfiguration['options'] ?? [];
$informationResult = $this->nodeFactory->create($options)->render(); $informationResult = $this->nodeFactory->create($options)->render();
$allowedTags = '<a><br><br/><div><em><i><p><strong>'; $allowedTags = '<a><br><br/><div><em><i><p><strong><span>';
if (strip_tags($informationResult['html'], $allowedTags) !== $informationResult['html']) { if (strip_tags($informationResult['html'], $allowedTags) !== $informationResult['html']) {
throw new \RuntimeException( throw new \RuntimeException(
'The field information API supports only a limited number of HTML tags within the result' 'The field information API supports only a limited number of HTML tags within the result'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment