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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user