1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-15 21:14:07 +02:00

[ReporterreBridge + KernelBugTrackerBridge + BastaBridge] Use defaultLinkTo() (#1862)

This commit is contained in:
Joseph
2020-11-23 18:49:25 +00:00
committed by GitHub
parent 0755181555
commit 1e75f9d3d5
3 changed files with 9 additions and 26 deletions

View File

@@ -8,6 +8,7 @@ class ReporterreBridge extends BridgeAbstract {
private function extractContent($url){
$html2 = getSimpleHTMLDOM($url);
$html2 = defaultLinkTo($html2, self::URI);
foreach($html2->find('div[style=text-align:justify]') as $e) {
$text = $e->outertext;
@@ -16,13 +17,6 @@ class ReporterreBridge extends BridgeAbstract {
$html2->clear();
unset($html2);
// Replace all relative urls with absolute ones
$text = preg_replace(
'/(href|src)(\=[\"\'])(?!http)([^"\']+)/ims',
'$1$2' . self::URI . '$3',
$text
);
$text = strip_tags($text, '<p><br><a><img>');
return $text;
}