Skip to content

Instantly share code, notes, and snippets.

@kurtpayne
Created March 20, 2012 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurtpayne/2141043 to your computer and use it in GitHub Desktop.
Save kurtpayne/2141043 to your computer and use it in GitHub Desktop.
Patch make_clickable
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
@kurtpayne
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment