Opened 12 years ago
Closed 12 years ago
#21399 closed Uncategorized (worksforme)
Equal sign in message breaks contrib.messages when CookieStorage is used.
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | contrib.messages | Version: | 1.4 |
| Severity: | Normal | Keywords: | messages cookiestorage cookie |
| Cc: | anton@… | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Hello!
If you have a equal sign (=) in your message and you use the CookieStorage and you do a Redirect after the have added the message, than: the message is never displayed
I think because the equal sign is not escaped and breaks the cookie. This happens in Django 1.4.5
Note:
See TracTickets
for help on using tickets.
Hi,
I can't reproduce the issue you're describing (I tried on master and on 1.4.5 and with both the
CookieStorageand the default one).Here's the code I used:
views.py
show_messages.html
<h1>Messages</h1> <ul> {% for message in messages %} <li>{{ message }}</li> {% endfor %} </ul> <form method="post"> <input type="submit" value="Add message"> {% csrf_token %} </form>Plug this in your urlconf somewhere and go to the page.
When you click the "add message" button, you can see that a message is added even though in contains an equal sign.
I'll close this ticket as
worksforme. Please reopen it if you have more information on how to reproduce this issue.Thanks