*
* with
*
*
*/
class FixUnescapedCurlyBracesInHtmlAttributes extends AbstractNormalization
{
/**
* {@inheritdoc}
*/
protected $queries = ['//*[namespace-uri() != $XSL]/@*[contains(., "{")]'];
/**
* {@inheritdoc}
*/
protected function normalizeAttribute(DOMAttr $attribute)
{
$match = [
'(\\b(?:do|else|(?:if|while)\\s*\\(.*?\\))\\s*\\{(?![{@]))',
'(\\bfunction\\s*\\w*\\s*\\([^\\)]*\\)\\s*\\{(?!\\{))',
'(=(?:>|>)\\s*\\{(?!\\{))',
'((?value);
$attribute->value = htmlspecialchars($attrValue, ENT_NOQUOTES, 'UTF-8');
}
}