Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#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: UI/UX:

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)

Changed 5 years ago by timesong

comment:1 Changed 5 years ago by russellm

  • Has patch set
  • milestone 1.2 deleted
  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Not critical for 1.2.

comment:2 Changed 5 years ago by dpn

Patch now diffed against root of project and contains a test.

comment:3 Changed 5 years ago by dpn

Fixed the docstring.

use the -doc patch.

comment:4 Changed 5 years ago by jonasnockert

Should/could this be marked as milestone 1.4?

For what it's worth, there's a little more information on Stack Overflow.

Changed 5 years ago by julien

comment:5 Changed 5 years ago by julien

  • milestone set to 1.3
  • Needs tests unset
  • Triage Stage changed from Accepted to 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.

comment:6 Changed 5 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

In [15720]:

Fixed #13411 -- Made sure URL fragments are correctly handled by the next_redirect utility of the comments apps. Thanks, timesong, dpn and Julien Phalip.

comment:7 Changed 5 years ago by jezdez

In [15721]:

[1.2.X] Fixed #13411 -- Made sure URL fragments are correctly handled by the next_redirect utility of the comments apps. Thanks, timesong, dpn and Julien Phalip.

Backport from trunk (r15720).

comment:8 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top