diff --git a/ghost/admin/app/initializers/trailing-history.js b/ghost/admin/app/initializers/trailing-history.js index d24d9429b2..73493e4637 100644 --- a/ghost/admin/app/initializers/trailing-history.js +++ b/ghost/admin/app/initializers/trailing-history.js @@ -4,7 +4,13 @@ const {HistoryLocation} = Ember; let trailingHistory = HistoryLocation.extend({ formatURL() { - return this._super(...arguments).replace(/\/?$/, '/'); + let url = this._super(...arguments); + + if (url.indexOf('?') > 0) { + return url.replace(/([^\/])\?/, '$1/?'); + } else { + return url.replace(/\/?$/, '/'); + } } });