aboutsummaryrefslogtreecommitdiff
path: root/lib/html.php
diff options
context:
space:
mode:
authorGravatar logmanoriginal <logmanoriginal@users.noreply.github.com> 2019-06-02 13:03:26 +0200
committerGravatar logmanoriginal <logmanoriginal@users.noreply.github.com> 2019-06-02 13:06:16 +0200
commit6c4098d6558c33a5fcb2a8bc9fb29e915d56fc6c (patch)
tree433e33c7cab8b7aac2342c7d8c8e8ddf325463c5 /lib/html.php
parent468d8be72d34f0a94e5ae4090b3321c5bda4db35 (diff)
downloadrss-bridge-6c4098d6558c33a5fcb2a8bc9fb29e915d56fc6c.tar.gz
rss-bridge-6c4098d6558c33a5fcb2a8bc9fb29e915d56fc6c.tar.zst
rss-bridge-6c4098d6558c33a5fcb2a8bc9fb29e915d56fc6c.zip
Revert "all: Use ->remove() instead of ->outertext = ''"
This reverts commit 052844f5e13c71ceefd743136a71f71226a0eefb. There is a bug in ->remove() that causes the parser to incorrectly identify elements in the DOM tree that shouldn't exist anymore. References #1151
Diffstat (limited to 'lib/html.php')
-rw-r--r--lib/html.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/html.php b/lib/html.php
index 49c77f04..13db97a4 100644
--- a/lib/html.php
+++ b/lib/html.php
@@ -36,7 +36,7 @@ function sanitize($html,
if(in_array($element->tag, $text_to_keep)) {
$element->outertext = $element->plaintext;
} elseif(in_array($element->tag, $tags_to_remove)) {
- $element->remove();
+ $element->outertext = '';
} else {
foreach($element->getAllAttributes() as $attributeName => $attribute) {
if(!in_array($attributeName, $attributes_to_keep))