Issue #2506349 by alexpott: Unnecessary looping in Xss::filter when processing attributes
parent
a1bc737216
commit
0dbb619f9d
|
@ -143,11 +143,10 @@ class Xss {
|
|||
return '<';
|
||||
}
|
||||
|
||||
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
|
||||
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)\s*([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
|
||||
// Seriously malformed.
|
||||
return '';
|
||||
}
|
||||
|
||||
$slash = trim($matches[1]);
|
||||
$elem = &$matches[2];
|
||||
$attrlist = &$matches[3];
|
||||
|
|
Loading…
Reference in New Issue