From aeca4cfd60c53f1429d318c8f78066cd65dbe9e5 Mon Sep 17 00:00:00 2001 From: Thibault Couraud <1036233+couraudt@users.noreply.github.com> Date: Sun, 16 Jun 2019 17:40:21 +0000 Subject: [PATCH] [BAEBridge] Use defaultLinkTo rather than str_replace (#1168) --- bridges/BAEBridge.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bridges/BAEBridge.php b/bridges/BAEBridge.php index caa2cf729e8..6c5d8ba22c2 100644 --- a/bridges/BAEBridge.php +++ b/bridges/BAEBridge.php @@ -55,9 +55,7 @@ public function collectData() { $content .= '
'; $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'));