Created
March 20, 2012 20:38
-
-
Save kurtpayne/2141043 to your computer and use it in GitHub Desktop.
Patch make_clickable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: W:/wordpress-unit-tests/wordpress/wp-includes/formatting.php | |
=================================================================== | |
--- W:/wordpress-unit-tests/wordpress/wp-includes/formatting.php (revision 20220) | |
+++ W:/wordpress-unit-tests/wordpress/wp-includes/formatting.php (working copy) | |
@@ -1484,7 +1484,7 @@ | |
$ret = " $ret "; // Pad with whitespace to simplify the regexes | |
$url_clickable = '~ | |
- ([\\s(<.,;:!?]) # 1: Leading whitespace, or punctuation | |
+ ([\\s(<>.,;:!?]) # 1: Leading whitespace, or punctuation | |
( # 2: URL | |
[\\w]{1,20}+:// # Scheme and hier-part prefix | |
(?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These unit tests currently fail. This patch would allow them to pass:
http://unit-test.trac.wordpress.org/browser/wp-testcase/test_includes_formatting.php#L266