Opened 3 years ago

Closed 3 years ago

#32866 closed Bug (fixed)

urlize() does not handle html escaped string and trailing punctuation correctly

Reported by: Shipeng Feng Owned by: Shipeng Feng
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Example:

urlize('Search for google.com/?q=1&lt! and see.')

# expected output
'Search for <a href="http://google.com/?q=1%3C">google.com/?q=1&lt</a>! and see.'

# actual output
'Search for <a href="http://google.com/?q=1%3C">google.com/?q=1&lt</a>lt! and see.'

Change History (5)

comment:1 by Shipeng Feng, 3 years ago

Owner: changed from nobody to Shipeng Feng
Status: newassigned

comment:3 by Shipeng Feng, 3 years ago

Summary: urlize does not handle html escaped string correctlyurlize() does not handle html escaped string and trailing punctuation correctly

comment:4 by Carlton Gibson, 3 years ago

Triage Stage: UnreviewedAccepted

OK, thanks, the example looks right. It's always delicate but let's take this for review.

Related to #26193.

comment:5 by GitHub <noreply@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 68cc0488:

Fixed #32866 -- Fixed trimming trailing punctuation from escaped string in urlize().

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