mirror of
https://github.com/getgrav/grav.git
synced 2026-09-02 04:16:12 +02:00
fix for issue with absolute_urls: true and link rewriting with assets pipeline
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user