diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index a756f6d12a..77c772001c 100644
|
a
|
b
|
function _make_url_clickable_cb( $matches ) { |
| 2946 | 2946 | |
| 2947 | 2947 | if ( ')' === $matches[3] && strpos( $url, '(' ) ) { |
| 2948 | 2948 | /* |
| 2949 | | * If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, |
| | 2949 | * If the trailing character is a closing parenthesis, and the URL has an opening parenthesis in it, |
| 2950 | 2950 | * add the closing parenthesis to the URL. Then we can let the parenthesis balancer do its thing below. |
| 2951 | 2951 | */ |
| 2952 | 2952 | $url .= $matches[3]; |
| … |
… |
function make_clickable( $text ) { |
| 3105 | 3105 | // Long strings might contain expensive edge cases... |
| 3106 | 3106 | if ( 10000 < strlen( $piece ) ) { |
| 3107 | 3107 | // ...break it up. |
| 3108 | | foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses. |
| | 3108 | foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing parentheses. |
| 3109 | 3109 | if ( 2101 < strlen( $chunk ) ) { |
| 3110 | 3110 | $r .= $chunk; // Too big, no whitespace: bail. |
| 3111 | 3111 | } else { |
| … |
… |
function make_clickable( $text ) { |
| 3121 | 3121 | [\\w]{1,20}+:// # Scheme and hier-part prefix. |
| 3122 | 3122 | (?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long. |
| 3123 | 3123 | [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+ # Non-punctuation URL character. |
| 3124 | | (?: # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character. |
| | 3124 | (?: # Unroll the Loop: Only allow punctuation URL character if followed by a non-punctuation URL character. |
| 3125 | 3125 | [\'.,;:!?)] # Punctuation URL character. |
| 3126 | 3126 | [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character. |
| 3127 | 3127 | )* |
| 3128 | 3128 | ) |
| 3129 | | (\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing). |
| | 3129 | (\)?) # 3: Trailing closing parenthesis (for parenthesis balancing post processing). |
| 3130 | 3130 | ~xS'; |
| 3131 | 3131 | /* |
| 3132 | 3132 | * The regex is a non-anchored pattern and does not have a single fixed starting character. |