diff --git a/CHANGELOG.md b/CHANGELOG.md index bd79d1a06..8a47f7d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## xx/xx/2016 1. [](#improved) - * moved to new `data-*@` format in blueprints + * Moved to new `data-*@` format in blueprints +1. [](#bugfix) + * Fixed issue with link rewrites and local assets pipeline with `absolute_urls: true` # v1.1.0-beta.1 ## 04/20/2016 diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index ebdce1b7b..55b19e63c 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -1004,6 +1004,13 @@ class Assets */ protected function isRemoteLink($link) { + $base = Grav::instance()['uri']->rootUrl(true); + + // sanity check for local URLs with absolute URL's enabled + if (Utils::startsWith($link, $base)) { + return false; + } + return ('http://' === substr($link, 0, 7) || 'https://' === substr($link, 0, 8) || '//' === substr($link, 0, 2)); }