Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Disable relative URLs in feeds #145

Merged
merged 1 commit into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Disable relative URLs in feeds ([#145](https://github.com/roots/soil/issues/145))
* Switch from Google CDN to jQuery CDN ([#144](https://github.com/roots/soil/issues/144))

### 3.6.2: December 24th, 2015
Expand Down
4 changes: 4 additions & 0 deletions lib/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* Make a URL relative
*/
function root_relative_url($input) {
if (is_feed()) {
return $input;
}

$url = parse_url($input);
if (!isset($url['host']) || !isset($url['path'])) {
return $input;
Expand Down