Commit 403a5b71 authored by Frans Saris's avatar Frans Saris Committed by Susanne Moog
Browse files

[FOLLOWUP][TASK] Code cleanup for RteHtmlParser

Resolves: #79280
Releases: master
Change-Id: I1d3815cef36d624c910d40eb6d63a3eba4f3f53d

Tested-by: default avatarTYPO3com <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Tested-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Susanne Moog's avatarSusanne Moog <>
Tested-by: Susanne Moog's avatarSusanne Moog <>
parent 8093cb00
......@@ -994,7 +994,7 @@ class RteHtmlParser extends HtmlParser
if (!empty($this->allowedAttributesForParagraphTags)) {
list($tagAttributes) = $this->get_tag_attributes($fTag);
// Make sure the tag attributes only contain the ones that are defined to be allowed
$tagAttributes = array_intersect_key($tagAttributes, $this->allowedAttributesForParagraphTags);
$tagAttributes = array_intersect_key($tagAttributes, array_flip($this->allowedAttributesForParagraphTags));
// Only allow classes that are whitelisted in $this->allowedClasses
if (trim($tagAttributes['class']) !== '' && !empty($this->allowedClasses) && !in_array($tagAttributes['class'], $this->allowedClasses, true)) {
Supports Markdown
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