Re: How to urlquote backslash in reverse arguments
On Tue, Dec 17, 2013 at 10:15 AM, Vitaly <hash.3g@gmail.com> wrote:
> Hi
>
> I got an some incorrection in reverse behaviour.
>
> From django docs
>
> The string returned by reverse() is already urlquoted. For example:
>
>>>> reverse('cities', args=[u'Orléans'])
> '.../Orl%C3%A9ans/'
> Applying further encoding (such as urlquote() or urllib.quote) to the output
> of reverse() may produce undesirable results.
>
> But why backslash is not? How to make it urlquoted to %2F in that case?
Why *would* a backslash be quoted?
Neither django, nor python's urllib.quote would replace a backslash by
default, as it is not normally required.
Lets put it another way, what are you trying to do that causes
backslashes not being escaped to be a problem?
Cheers
Tom
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1LDvsT-3z2NekpWHdetage14SMLsVYpjOMaK2wtLYpbJw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home