From adcc8e371d7b369f46945e01ce57b7561f383726 Mon Sep 17 00:00:00 2001 From: Tone <66808319+Tone866@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:20:10 +0200 Subject: [PATCH] [TarnkappeBridge] changed "unwanted stuff" (#4206) * [TarnkappeBridge] changed "unwanted stuff" em was removed because the annoying affiliate info, but it also deleted the text from blockquotes. The p-element with the affiliate info has no attributes like class, but it is the only p-element with a style-attribute, so I used this to identify it. * Update TarnkappeBridge.php removed whitespace * Update TarnkappeBridge.php don't know why I did it twice before --- bridges/TarnkappeBridge.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridges/TarnkappeBridge.php b/bridges/TarnkappeBridge.php index c04c9546..374a79b3 100644 --- a/bridges/TarnkappeBridge.php +++ b/bridges/TarnkappeBridge.php @@ -65,10 +65,11 @@ class TarnkappeBridge extends FeedExpander // remove unwanted stuff foreach ( - $article->find('em, section, div.menu') as $element + $article->find('section, div.menu, p[style]') as $element ) { $element->remove(); } + // reload html, as remove() is buggy $article = str_get_html($article->outertext);