array_keys is probably faster
This commit is contained in:
parent
6d0156d707
commit
e4bb12329e
|
@ -1530,9 +1530,9 @@ class Parsedown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$onEventAttributes = preg_grep('/^on/i', array_flip($Element['attributes']));
|
$onEventAttributeKeys = preg_grep('/^on/i', array_keys($Element['attributes']));
|
||||||
|
|
||||||
foreach ($onEventAttributes as $att)
|
foreach ($onEventAttributeKeys as $att)
|
||||||
{
|
{
|
||||||
unset($Element['attributes'][$att]);
|
unset($Element['attributes'][$att]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue