summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-11-30 15:02:01 +0300
committerAndrew Dolgov <[email protected]>2018-11-30 15:02:01 +0300
commit50052fb78a3a9d1bb3fa488e7fd7b23125c38124 (patch)
treeded95b76c11388c42ef80ffe50c2fd71e986b0a3 /include
parent5f211e37a4b654742dfca4c7d60f38d0ab09b352 (diff)
strip_harmful_tags: remove data- attributes
Diffstat (limited to 'include')
-rwxr-xr-xinclude/functions.php4
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);
}