Skip to content

Commit ae9e342

Browse files
committed
[HeiseBridge] remove newlines/double figcaption
Affected article: https://www.heise.de/tests/Windrose-Spassiger-Jack-Sparrow-Simulator-fuer-kleines-Geld-11263221.html Co-autored-by: Tone866 <66808319+Tone866@users.noreply.github.com>
1 parent 0699d88 commit ae9e342

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

bridges/HeiseBridge.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ private function addArticleToItem($item, $article)
221221
}
222222
}
223223
}
224+
225+
// strip p tags inside of figcaption to avoid doubling it
226+
foreach ($article->find('figcaption p') as $key => $elem) {
227+
$elem->outertext = $elem->plaintext;
228+
$reloadneeded = 1;
229+
}
230+
224231
if (isset($reloadneeded)) {
225232
$article = str_get_html($article->outertext);
226233
}

0 commit comments

Comments
 (0)