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
Reviewed-on: https://review.typo3.org/51455

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
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