Skip to content

Commit

Permalink
Fix classes on non-http based protocol links #2034
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 31, 2018
1 parent 93f3fa9 commit 8e065e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Updated robots.txt to include `/user/images/` folder [#2043](https://github.com/getgrav/grav/pull/2043)
1. [](#bugfix)
* Handle `errors.display` system property better in admin plugin [admin#1452](https://github.com/getgrav/grav-plugin-admin/issues/1452)
* Fix classes on non-http based protocol links [#2034](https://github.com/getgrav/grav/issues/2034)

# v1.4.5
## 05/15/2018
Expand Down
3 changes: 1 addition & 2 deletions system/src/Grav/Common/Helpers/Excerpts.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ public static function processLinkExcerpt($excerpt, Page $page, $type = 'link')
if ($type !== 'image' && !empty($url_parts['stream']) && !empty($url_parts['path'])) {
$url_parts['path'] = Grav::instance()['base_url_relative'] . '/' . static::resolveStream("{$url_parts['scheme']}://{$url_parts['path']}");
unset($url_parts['stream'], $url_parts['scheme']);

$excerpt['element']['attributes']['href'] = Uri::buildUrl($url_parts);
}

$excerpt['element']['attributes']['href'] = Uri::buildUrl($url_parts);
return $excerpt;
}

Expand Down

0 comments on commit 8e065e1

Please sign in to comment.