Fix resolved link class URL mangling when the keep_query argument is used.

Fixes source navigation on the document upload wizard. Thanks to
Nick Douma (LordGaav) for the report and diagnostic information. GitLab
issue #436.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-09-10 20:31:38 -04:00
parent 51026cc55e
commit da8fa6f91c
5 changed files with 55 additions and 2 deletions

View File

@@ -363,7 +363,10 @@ class Link(object):
except KeyError:
pass
resolved_link.url = parsed_url.url
# Use the link's URL but with the previous URL querystring
new_url = furl(resolved_link.url)
new_url.args = parsed_url.querystr
resolved_link.url = new_url.url
resolved_link.context = context
return resolved_link