diff options
author | 2019-06-02 13:03:26 +0200 | |
---|---|---|
committer | 2019-06-02 13:06:16 +0200 | |
commit | 6c4098d6558c33a5fcb2a8bc9fb29e915d56fc6c (patch) | |
tree | 433e33c7cab8b7aac2342c7d8c8e8ddf325463c5 /lib/html.php | |
parent | 468d8be72d34f0a94e5ae4090b3321c5bda4db35 (diff) | |
download | rss-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.php | 2 |
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)) |