Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix url encoding. #640

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vj4/handler/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import markupsafe
import pytz
import sockjs
import urllib.parse
from aiohttp import web
from email import utils

Expand Down Expand Up @@ -367,7 +368,8 @@ def _get_csrf_token(session_id_binary):
@functools.lru_cache()
def _reverse_url(name, *, domain_id, **kwargs):
"""DEPRECATED: This function is deprecated. But we don't have a replacement yet."""
kwargs = {key: str(value) for key, value in kwargs.items()}
kwargs = {key: urllib.parse.quote(str(value), safe='')
for key, value in kwargs.items()}
if domain_id != builtin.DOMAIN_ID_SYSTEM:
name += '_with_domain_id'
kwargs['domain_id'] = domain_id
Expand Down