Changeset 53044 for trunk/src/wp-includes/functions.php
- Timestamp:
- 04/01/2022 03:38:55 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r53035 r53044 821 821 * 822 822 * @since 3.7.0 823 * @since 6.0.0 Fixes support for HTML entities (Trac 30580). 823 824 * 824 825 * @param string $content Content to extract URLs from. … … 834 835 . '\([\w\d]+\)|' 835 836 . '(?:' 836 . "[^`!()\[\]{} ;:'\".,<>«»“”‘’\s]|"837 . "[^`!()\[\]{}:'\".,<>«»“”‘’\s]|" 837 838 . '(?:[:]\d+)?/?' 838 839 . ')+' … … 843 844 ); 844 845 845 $post_links = array_unique( array_map( 'html_entity_decode', $post_links[2] ) ); 846 $post_links = array_unique( 847 array_map( 848 static function( $link ) { 849 // Decode to replace valid entities, like &. 850 $link = html_entity_decode( $link ); 851 // Maintain backward compatibility by removing extraneous semi-colons (`;`). 852 return str_replace( ';', '', $link ); 853 }, 854 $post_links[2] 855 ) 856 ); 846 857 847 858 return array_values( $post_links );
Note: See TracChangeset
for help on using the changeset viewer.