mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-19 08:57:27 +02:00
Revert "all: Use ->remove() instead of ->outertext = ''"
This reverts commit 052844f5e1
.
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
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user