Changeset 59143
- Timestamp:
- 09/30/2024 11:27:34 PM (9 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r59120 r59143 2944 2944 } 2945 2945 2946 if ( isset( $matches[4] ) && ! empty( $matches[4] ) ) { 2947 $url .= $matches[4]; 2948 } 2949 2946 2950 // Include parentheses in the URL only if paired. 2947 2951 while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) { … … 3116 3120 ) 3117 3121 (\)?) # 3: Trailing closing parenthesis (for parenthesis balancing post processing). 3122 (\\.\\w{2,6})? # 4: Allowing file extensions (e.g., .jpg, .png). 3118 3123 ~xS'; 3119 3124 /* -
trunk/tests/phpunit/tests/formatting/makeClickable.php
r57987 r59143 246 246 ), 247 247 248 // @ticket #62037 249 'URL with brackets in path before the extension' => array( 250 'text' => 'http://example-image(2).jpg', 251 'expected' => '<a href="http://example-image(2).jpg" rel="nofollow">http://example-image(2).jpg</a>', 252 ), 253 'URL with brackets within path and with a extension' => array( 254 'text' => 'http://example-(2)-image.jpg', 255 'expected' => '<a href="http://example-(2)-image.jpg" rel="nofollow">http://example-(2)-image.jpg</a>', 256 ), 257 248 258 // @ticket 11211 249 259 // Test with real comments which were incorrectly linked.
Note: See TracChangeset
for help on using the changeset viewer.