]> git.wh0rd.org - tt-rss.git/commitdiff
strip_harmful_tags: remove data- attributes
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 30 Nov 2018 12:02:01 +0000 (15:02 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 30 Nov 2018 12:02:01 +0000 (15:02 +0300)
include/functions.php

index 1dd9a7a1cc7fd106d5d7a5130bac9612600fe9a6..9125df3bd8a367cd65cca22d4be2596d67cc77b1 100755 (executable)
                                                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);
                                        }