Skip to content
Browse files
Fix #2934 (spaces in link tags)
Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Dec 17, 2017
1 parent 927a2b4 commit f2b0b7684be4771e7aed8dc7359c6a8996f110d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
@@ -27,6 +27,7 @@ Features

* Unquote paths given to ``link://`` magic URLs (Issue #2934)
* Specify UTF-8 input encoding for Mako as default (Issue #2930)
* Don't trigger rebuilds in auto mode for files it's safe to ignore
(Issue #2906)
@@ -1422,11 +1422,11 @@ def url_replacer(self, src, dst, lang=None, url_type=None):
if dst_url.query:
# If query strings are used in magic link, they will be
# passed to the path handler as keyword arguments (strings)
link_kwargs = {k: v[-1] for k, v in parse_qs(dst_url.query).items()}
link_kwargs = {unquote(k): unquote(v[-1]) for k, v in parse_qs(dst_url.query).items()}
link_kwargs = {}

dst =, dst_url.path.lstrip('/'), lang, **link_kwargs)
dst =, unquote(dst_url.path.lstrip('/')), lang, **link_kwargs)
# Assuming the site is served over one of these, and
# since those are the only URLs we want to rewrite...

0 comments on commit f2b0b76

Please sign in to comment.