protected static CDATACallback ( array $matches ) : string | ||
$matches | array | PCRE matches array, with index 0 the entire match and 1 the inside of the CDATA section. |
return | string | Escaped internals of the CDATA section. |
protected static function CDATACallback($matches)
{
// not exactly sure why the character set is needed, but whatever
return htmlspecialchars($matches[1], ENT_COMPAT, 'UTF-8');
}