[wp-trac] [WordPress Trac] #23922: make_clickable() breaks when colon in hash
WordPress Trac
noreply at wordpress.org
Sun Oct 27 20:54:22 UTC 2013
#23922: make_clickable() breaks when colon in hash
----------------------------------------+------------------------------
Reporter: Viper007Bond | Owner:
Type: defect (bug) | Status: new
Priority: lowest | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: minor | Resolution:
Keywords: needs-patch has-unit-tests |
----------------------------------------+------------------------------
Changes (by ericmann):
* keywords: needs-patch needs-unit-tests => needs-patch has-unit-tests
Comment:
Added a test method to check three potential URL structures:
1. Url with trailing colon (used in ticket description)
2. Url with embedded colon in hash (used in Trac URLs specifically)
3. Url with trailing period
Finding parity between the first and third cases is the difficulty here.
The original `make_clickable()` method specifically only allows
punctuation characters when followed by non-punctuation characters
(meaning case #2 will actually work). Removing the colon from this
punctuation check will allow case #1 to pass, but then case #2 will fail.
Whatever fix is introduced, retaining the functionality of case #3
(trailing non-colon punctuation) is vital to allowing links that are made
clickable to be placed at the end of a sentence, before a coma, etc.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23922#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list