Skip to content
Snippets Groups Projects

Issue #3366843: Fix tests broken on PHP 8.3

Closed Andrey Postnikov requested to merge issue/drupal-3366843:3366843-domattr-value into 11.x
@@ -94,7 +94,10 @@ protected static function filterXssDataAttributes($html) {
// value. There is no need to explicitly decode $node->value, since the
// DOMAttr::value getter returns the decoded value.
$value = Xss::filterAdmin($node->value);
$node->value = Html::escape($value);
// Work around https://github.com/php/php-src/issues/8388
// Assigning to $node->value decodes the value, contrary to the DOM spec.
$node->value = '';
$node->appendChild(new \DOMText($value));
}
$html = Html::serialize($dom);
}
Loading