mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
fix: use user.escaped_name in page urls
This commit is contained in:
@@ -61,9 +61,9 @@ class HomeHandler(BaseHandler):
|
|||||||
# to establish that this is an explicit spawn request rather
|
# to establish that this is an explicit spawn request rather
|
||||||
# than an implicit one, which can be caused by any link to `/user/:name(/:server_name)`
|
# than an implicit one, which can be caused by any link to `/user/:name(/:server_name)`
|
||||||
if user.active:
|
if user.active:
|
||||||
url = url_path_join(self.base_url, 'user', user.name)
|
url = url_path_join(self.base_url, 'user', user.escaped_name)
|
||||||
else:
|
else:
|
||||||
url = url_path_join(self.hub.base_url, 'spawn', user.name)
|
url = url_path_join(self.hub.base_url, 'spawn', user.escaped_name)
|
||||||
|
|
||||||
html = self.render_template(
|
html = self.render_template(
|
||||||
'home.html',
|
'home.html',
|
||||||
@@ -132,7 +132,7 @@ class SpawnHandler(BaseHandler):
|
|||||||
# which may get handled by the default server if they aren't ready yet
|
# which may get handled by the default server if they aren't ready yet
|
||||||
|
|
||||||
pending_url = url_path_join(
|
pending_url = url_path_join(
|
||||||
self.hub.base_url, "spawn-pending", user.name, server_name
|
self.hub.base_url, "spawn-pending", user.escaped_name, server_name
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.get_argument('next', None):
|
if self.get_argument('next', None):
|
||||||
|
Reference in New Issue
Block a user