Rev1781, Only force / to end of site address

This commit is contained in:
shortcutme 2016-12-09 01:00:53 +01:00
parent c4ae8ef711
commit a17ab1ce25
3 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.5.1"
self.rev = 1780
self.rev = 1781
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"

View file

@ -141,7 +141,7 @@ class Wrapper
if query == null
query = window.location.search
back = window.location.pathname
if back.slice(-1) != "/"
if back.match /^\/[^\/]*$/ # Add / after site address if called without it
back += "/"
if query.replace("?", "")
back += "?"+query.replace("?", "")

View file

@ -959,7 +959,7 @@ jQuery.extend( jQuery.easing,
query = window.location.search;
}
back = window.location.pathname;
if (back.slice(-1) !== "/") {
if (back.match(/^\/[^\/]*$/)) {
back += "/";
}
if (query.replace("?", "")) {