fix for issue with absolute_urls: true and link rewriting with assets pipeline

This commit is contained in:
Andy Miller
2016-04-21 17:41:14 -06:00
parent 2abd70467c
commit 385c076964
2 changed files with 10 additions and 1 deletions

View File

@@ -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

View File

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