[wp-trac] [WordPress Trac] #14993: make_clickable issue with ! character in URL
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 30 10:00:56 UTC 2010
#14993: make_clickable issue with ! character in URL
--------------------------+-------------------------------------------------
Reporter: lancewillett | Owner: westi
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.1
Component: Formatting | Version: 3.0.1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by hakre):
This is a bug in wordpress. URL is defined by
[http://tools.ietf.org/html/rfc3986 RFC3986] and the "!" character is part
of the reserved group which makes it immune to transition. Simply said:
It's part of the URL - in any case.
Space is not btw, which means, that if it's followed by space it can be
both: an exclamation mark and the end of a sentence.
As we already do treat other chars of the reserved group as part of the
URL (e.g. "?"), "!" should be treated the same.
If the discussion in this ticket changes some minds that treating
characters of the reserved group differently as we currently do in
make_clickable, then the behaviour should be changed for the other
reserved characters as well.
For any decision, this will break backwards-compability.
Reserved characters are:
{{{
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
}}}
[http://tools.ietf.org/html/rfc3986#page-13 Source: RFC 3986 page 13]
A nice test-text:
{{{
Did it appear on http://www.google.com/?
Yes, it did appear on http://www.google.com/!
}}}
Example of the current implementation on wordpress.com:
[http://hakre.wordpress.com/2010/09/29/washtml-php-library/#comment-954
Link].
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14993#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list