Fix removal of on=... attributes from html generated from markdown

This commit is contained in:
Dennis Verspuij 2018-03-19 10:01:20 +00:00
parent 60a94dab22
commit b525810c14

View file

@ -288,7 +288,7 @@ function sanitize_html($description)
$description);
}
$description = preg_replace(
'#(<[^>]+)on[a-z]*="?[^ "]*"?#is',
'#(<[^>]+\s)on[a-z]*="?[^ "]*"?#is',
'$1',
$description);
return $description;