utils: convert template vars to strings in URL templates (#16686)

This commit is contained in:
Frédéric Péters 2017-06-03 22:16:45 +02:00
parent 614c66c17d
commit 123def27c4
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ def get_templated_url(url, context=None):
return '['
if varname not in template_vars:
raise UnknownTemplateVariableError(varname)
return template_vars[varname]
return unicode(template_vars[varname])
return re.sub(r'(\[.+?\])', repl, url)