﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6892	"Warn about raw ""%"" in redirect_to strings."	daonb <bennydaon@…>	nobody	"from my urls.py:

{{{
url(r'^password/change/done/$',
    django.views.generic.simple.redirect_to,
    {'url': '/toviva/myroom/?' + urlencode({'message': _('Password change successful')})})
}}}

When I access the url I get an error:
{{{
ValueError at /toviva/accounts/password/change/done/
unsupported format character 'D' (0x44) at index 25
}}}

printing the url parameters in redirect_to:
{{{
/toviva/myroom/?message=%D7%94%D7%A1%D7%99%D7%A1%D7%9E%D7%94+%D7%A9%D7%95%D7%A0%D7%AA%D7%94+%D7%91%D7%94%D7%A6%D7%9C%D7%97%D7%94
}}}

In redirect_to the line that fails is:
{{{
   return HttpResponsePermanentRedirect(url % kwargs)
}}}

I found another way to do it:
{{{
  url(r'^password/change/done/$',
    django.views.generic.simple.redirect_to,
    {'url': '/toviva/myroom/?message=%(message)s', 'message': urlquote_plus(_('Password change successful'))}),
}}}

Which works for me, but still - I'd be happy if someone can find a way to make redirect_to more robust.
"	Cleanup/optimization	closed	Generic views	dev	Normal	wontfix	unicode, url		Accepted	1	0	1	1	0	0
