mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-07 09:06:36 +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:
@@ -239,16 +239,16 @@ class JustETFBridge extends BridgeAbstract {
|
||||
or returnServerError('Article body not found!');
|
||||
|
||||
// Remove teaser image
|
||||
$element->find('img.teaser-img', 0)->remove();
|
||||
$element->find('img.teaser-img', 0)->outertext = '';
|
||||
|
||||
// Remove self advertisements
|
||||
foreach($element->find('.call-action') as $adv) {
|
||||
$adv->remove();
|
||||
$adv->outertext = '';
|
||||
}
|
||||
|
||||
// Remove tips
|
||||
foreach($element->find('.panel-edu') as $tip) {
|
||||
$tip->remove();
|
||||
$tip->outertext = '';
|
||||
}
|
||||
|
||||
// Remove inline scripts (used for i.e. interactive graphs) as they are
|
||||
@@ -318,7 +318,7 @@ class JustETFBridge extends BridgeAbstract {
|
||||
$description = $description->parent();
|
||||
|
||||
foreach($description->find('div') as $div) {
|
||||
$div->remove();
|
||||
$div->outertext = '';
|
||||
}
|
||||
|
||||
$quote = $html->find('div.infobox div.val', 0)
|
||||
|
Reference in New Issue
Block a user