Skip to content

Commit

Permalink
[BAEBridge] Use defaultLinkTo rather than str_replace (#1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
couraudt authored and logmanoriginal committed Jun 16, 2019
1 parent 686f21b commit aeca4cf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bridges/BAEBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ public function collectData() {

$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'));
Expand Down

0 comments on commit aeca4cf

Please sign in to comment.