[BAEBridge] Use defaultLinkTo rather than str_replace (#1168)

This commit is contained in:
Thibault Couraud 2019-06-16 17:40:21 +00:00 committed by LogMANOriginal
parent 686f21bc50
commit aeca4cfd60
1 changed files with 1 additions and 3 deletions

View File

@ -55,9 +55,7 @@ class BAEBridge extends BridgeAbstract {
$content .= '<hr>';
$content .= $htmlDetail->find('section', 0)->innertext;
$content = str_replace('src="/', 'src="' . parent::getURI() . '/', $content);
$content = str_replace('href="/', 'href="' . parent::getURI() . '/', $content);
$item['content'] = $content;
$item['content'] = defaultLinkTo($content, parent::getURI());
$image = $htmlDetail->find('#zoom', 0);
if ($image) {
$item['enclosures'] = array(parent::getURI() . $image->getAttribute('src'));