#13411 closed (fixed)
Some improvement for query string built by utils.next_redirect if next parameter contains '#' anchor
Reported by: | timesong | Owned by: | nobody |
---|---|---|---|
Component: | contrib.comments | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the comments app, views.utils.next_redirect appends a '?' and query string key/value pairs to the '#comment', so for example in template add '<input type="hidden" name="next" value="{{ article.get_absolute_url }}#comment" /></td>' will get 'http://www.example.com/articles/2#comment?c=7', it's incorrect.
Attachments (4)
Change History (12)
by , 15 years ago
Attachment: | patch01.patch added |
---|
comment:1 by , 15 years ago
Has patch: | set |
---|---|
milestone: | 1.2 |
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
by , 14 years ago
Attachment: | comment-with-query-string-and-anchor-with-unittests.diff added |
---|
by , 14 years ago
Attachment: | comment-with-query-string-and-anchor-with-unittests-doc.diff added |
---|
comment:4 by , 14 years ago
Should/could this be marked as milestone 1.4?
For what it's worth, there's a little more information on Stack Overflow.
by , 14 years ago
Attachment: | 13411_comment_redirect_with_anchor.diff added |
---|
comment:5 by , 14 years ago
milestone: | → 1.3 |
---|---|
Needs tests: | unset |
Triage Stage: | Accepted → Ready for checkin |
I've actually gotten bitten by this in one of my current projects. The patch looks good. I've just updated the test to make sure it works both with and without a query string.
Not critical for 1.2.