Changeset 57910
- Timestamp:
- 04/01/2024 08:53:55 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r57626 r57910 2947 2947 if ( ')' === $matches[3] && strpos( $url, '(' ) ) { 2948 2948 /* 2949 * If the trailing character is a closing pare thesis, 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 */ … … 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 pare theses.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. … … 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 pu ctuation 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 pare thesis balancing post processing).3129 (\)?) # 3: Trailing closing parenthesis (for parenthesis balancing post processing). 3130 3130 ~xS'; 3131 3131 /*
Note: See TracChangeset
for help on using the changeset viewer.