merge changest 35230

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45248 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2007-11-20 23:53:53 +00:00
parent 8a143aaf9a
commit 1ebefd7eff

View File

@ -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 )' );
}