Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18644 closed Bug (fixed)

django.util.html.urlize fails to trim trailing period when followed by a parenthesis

Reported by: ljosa Owned by: ljosa
Component: Template system Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Users would probably expect

django.utils.html.urlize('(Go to http://www.example.com/foo.)')

to produce

u'(Go to <a href="http://www.ljosa.priv.no/foo">http://www.ljosa.priv.no/foo</a>.)'

and not

u'(Go to <a href="http://www.ljosa.priv.no/foo.">http://www.ljosa.priv.no/foo.</a>)'

as it does at present.

The fix should be easy; I expect to submit a pull request soon.

Change History (6)

comment:1 by ljosa, 12 years ago

Has patch: set
Resolution: fixed
Status: newclosed

Fixed in Pull request 216. I also added a regression test.

comment:2 by Anssi Kääriäinen, 12 years ago

Resolution: fixed
Status: closedreopened

The ticket should not be closed until the patch gets committed into Django.

comment:3 by Anssi Kääriäinen, 12 years ago

Triage Stage: UnreviewedReady for checkin

To me the patch looks good, and the use case valid. Marking as ready for checkin. I will wait a while for comments before committing this.

comment:5 by Vebjorn Ljosa <vebjorn@…>, 12 years ago

Resolution: fixed
Status: reopenedclosed

In [d5012d6371e804fc0427112cc1ceacbe8a059c4f]:

Fixed #18644 -- Made urlize trim trailing period followed by parenthesis

comment:6 by Florian Apolloner <apollo13@…>, 12 years ago

In [59d99772f0e3c69bc1824ce1e76438d89c50c9b9]:

Merge pull request #216 from ljosa/ticket_18644

Fixed #18644 -- Made urlize trim trailing period followed by parenthesis

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