strip_harmful_tags: remove data- attributes
This commit is contained in:
parent
5f211e37a4
commit
50052fb78a
|
@ -1761,6 +1761,10 @@
|
|||
array_push($attrs_to_remove, $attr);
|
||||
}
|
||||
|
||||
if (strpos($attr->nodeName, "data-") === 0) {
|
||||
array_push($attrs_to_remove, $attr);
|
||||
}
|
||||
|
||||
if ($attr->nodeName == 'href' && stripos($attr->value, 'javascript:') === 0) {
|
||||
array_push($attrs_to_remove, $attr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue