Changes between Initial Version and Version 2 of Ticket #22946
- Timestamp:
- 12/15/2012 03:06:22 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22946
-
Property
Version
changed from
trunk
to2.0.4
-
Property
Component
changed from
General
toFormatting
-
Property
Version
changed from
-
Ticket #22946 – Description
initial v2 5 5 In my case, I was using the plugin WP Better Emails, and sent out an email with this line (approx): 6 6 7 'Here is the FTP server: ftp.example.com' 7 `Here is the FTP server: ftp.example.com` 8 8 9 9 WP, by default, "helpfully" totally mangles this into: 10 'Here is the FTP server: <a href="http://ftp.example.com">http://ftp.example.com</a>' 10 `Here is the FTP server: <a href="http://ftp.example.com">http://ftp.example.com</a>` 11 11 12 12 The recipient of my email now believes that I was sending him an HTTP link, and is confused that it does not work. But in fact I never sent such a link - that was WordPress mangling what I did send. … … 15 15 16 16 Proposed solution: on line 1471 of wp-includes/formatting.php (as found in 3.4.2), change: 17 17 {{{ 18 18 $ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret ); 19 19 }}} 20 20 by removing the "ftp" case, hence: 21 21 {{{ 22 22 $ret = preg_replace_callback( '#([\s>])((www)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret ); 23 23 }}} 24 24 The function _make_web_ftp_clickable_cb should then be renamed by removing ftp_, since the case of turning FTP hostnames into clickable HTTP links would have been removed.