diff --git a/core/HTTP.php b/core/HTTP.php index be29bf28e..7ca6ac366 100644 --- a/core/HTTP.php +++ b/core/HTTP.php @@ -35,6 +35,7 @@ class HTTP { * Turn all relative URLs in the content to absolute URLs */ static function absoluteURLs($html) { + $html = str_replace('$CurrentPageURL', $_SERVER['REQUEST_URI'], $html); return HTTP::urlRewriter($html, '(substr($URL,0,1) == "/") ? ( Director::protocolAndHost() . $URL ) : ( (ereg("^[A-Za-z]+:", $URL)) ? $URL : Director::absoluteBaseURL() . $URL )' ); }