On May 28, 1:04 pm, Michael <folderpla...@gmail.com> wrote:

> If I look to the admin is see that for example spaces are replaced by
> a '+' sign and & is replaced by '%26'. I have just white spaces and
> the & sign in my parameters. To avoid this I have put the urlencode
> filter in my template.
>
> Example:
>
> {% for category in category_list %}
> <a href="?category={{ category.name|urlencode }}">{{ category.name }}</
> a><br/>
> {% endfor %}

Maybe not the answer you're looking for, but seems like a better job
for category.slug, so you don't have to worry about parsing for
whitespace, etc. That's what slugs are for!

./s

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to