Skip to content

Commit

Permalink
Prepend a leading / if the permalink does not contain a leading slash.
Browse files Browse the repository at this point in the history
  • Loading branch information
simensen committed Feb 6, 2015
1 parent d7c1b62 commit 1001a03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ProxySourceTaxonomyIndexGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public function generate(SourceInterface $source)
$permalink = substr($permalink, 2);
}

if (0 !== strpos($permalink, '/')) {
$permalink = '/'.$permalink;
}

if ($permalink) {
// not sure if this is ever going to happen?
$generatedSource->data()->set('permalink', $permalink);
Expand Down

0 comments on commit 1001a03

Please sign in to comment.