mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Merge pull request #5002 from ErisDS/issue-4989
Fixing overzealous trailing-slashes
This commit is contained in:
commit
46d1f812e6
@ -128,8 +128,9 @@ NavigationController = Ember.Controller.extend({
|
||||
url = match[1];
|
||||
|
||||
// if the last char is not a slash, then add one,
|
||||
// as long as there is no # or . in the URL (anchor or file extension)
|
||||
// this also handles the empty case for the homepage
|
||||
if (url[url.length - 1] !== '/') {
|
||||
if (url[url.length - 1] !== '/' && url.indexOf('#') === -1 && url.indexOf('.') === -1) {
|
||||
url += '/';
|
||||
}
|
||||
} else if (!validator.isURL(url) && url !== '' && url[0] !== '/' && url.indexOf('mailto:') !== 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user