Skip to content

Commit

Permalink
[#38] Fix relative file paths for view in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
pbatroff committed Nov 25, 2019
1 parent 5763a2b commit 20140a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proxy/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ function civiproxy_mend_URLs(&$string) {
}
if ($target_file) {
$string = preg_replace("#{$target_file}#", $proxy_base . '/file.php?id=', $string);
// https://github.com/systopia/CiviProxy/issues/38
// fix for relative
if ($target_mosaico) {
$string = preg_replace("#src=\"\/sites\/default\/files\/civicrm\/persist\/#", 'src="' . $proxy_base . '/file.php?id=', $string);
}
}
if ($target_mosaico) {
// replace full, and relative URL
Expand Down

0 comments on commit 20140a0

Please sign in to comment.