diff options
author | Andrew Dolgov <[email protected]> | 2018-11-30 15:02:01 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-11-30 15:02:01 +0300 |
commit | 50052fb78a3a9d1bb3fa488e7fd7b23125c38124 (patch) | |
tree | ded95b76c11388c42ef80ffe50c2fd71e986b0a3 /include/functions.php | |
parent | 5f211e37a4b654742dfca4c7d60f38d0ab09b352 (diff) |
strip_harmful_tags: remove data- attributes
Diffstat (limited to 'include/functions.php')
-rwxr-xr-x | include/functions.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index 1dd9a7a1c..9125df3bd 100755 --- a/include/functions.php +++ b/include/functions.php @@ -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); } |