Skip to content

Commit

Permalink
Fixed the image paths in documents (isotope#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski committed Mar 16, 2016
1 parent 49a3f45 commit 6c9ec6b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ protected function generateTemplate(IsotopeProductCollection $objCollection, arr
// Make image paths absolute
$strBuffer = preg_replace_callback('@(src=")([^"]+)(")@', function ($args) {
if (preg_match('@^(http://|https://)@', $args[2])) {
return $args[2];
return $args[1] . $args[2] . $args[3];
}
return $args[1] . TL_ROOT . '/' . rawurldecode($args[2]) . $args[3];
}, $strBuffer);
Expand Down

0 comments on commit 6c9ec6b

Please sign in to comment.