diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php index 8d09abf7b..8ecdb71e5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2801,7 +2801,8 @@ } function strip_harmful_tags($doc, $allowed_elements, $disallowed_attributes) { - $entries = $doc->getElementsByTagName("*"); + $xpath = new DOMXPath($doc); + $entries = $xpath->query('//*'); foreach ($entries as $entry) { if (!in_array($entry->nodeName, $allowed_elements)) { |