# HG changeset patch # User Matti Hamalainen # Date 1452903490 -7200 # Node ID 2d8112d6c3bc66709c2103849e3b47e56e81a14b # Parent b8f8e03f943bd8f720d98da83315c11e18353e78 Fix relative links re-parsing. diff -r b8f8e03f943b -r 2d8112d6c3bc mgallery.php --- a/mgallery.php Sat Jan 16 02:17:49 2016 +0200 +++ b/mgallery.php Sat Jan 16 02:18:10 2016 +0200 @@ -441,9 +441,9 @@ if (preg_match("@^[a-z]+://@i", $mstmp) === 0) { if ($mstmp[0] != "/") - $mstmp = $baseURL."/".$galPath."/".$mstmp; + $mstmp = $baseURL."/".$galPath."/".str_replace("//", "/", $mstmp); } - return "href=\"".str_replace("//", "/", $mstmp)."\""; + return "href=\"".$mstmp."\""; }, $galData["header"]);