Changeset 24241
- Timestamp:
- 05/10/2013 10:54:33 PM (11 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r24229 r24241 3207 3207 global $_links_add_target; 3208 3208 $tag = $m[1]; 3209 $link = preg_replace('|(target= [\'"](.*?)[\'"])|i', '', $m[2]);3209 $link = preg_replace('|(target=([\'"])(.*?)\2)|i', '', $m[2]); 3210 3210 return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">'; 3211 3211 } -
trunk/wp-includes/media.php
r24240 r24241 1930 1930 1931 1931 foreach ( $items as $item ) { 1932 preg_match_all( '#src= [\'"](.+?)[\'"]#is', $item, $src, PREG_SET_ORDER );1932 preg_match_all( '#src=([\'"])(.+?)\1#is', $item, $src, PREG_SET_ORDER ); 1933 1933 if ( ! empty( $src ) ) { 1934 1934 $srcs = array(); 1935 1935 foreach ( $src as $s ) 1936 $srcs[] = $s[ 1];1936 $srcs[] = $s[2]; 1937 1937 1938 1938 $data[] = array_values( array_unique( $srcs ) ); … … 2255 2255 2256 2256 foreach ( $tags as $tag ) { 2257 preg_match( '#src= [\'"](.+?)[\'"]#is', $tag, $src );2258 if ( ! empty( $src[ 1] ) ) {2259 $srcs[] = $src[ 1];2257 preg_match( '#src=([\'"])(.+?)\1#is', $tag, $src ); 2258 if ( ! empty( $src[2] ) ) { 2259 $srcs[] = $src[2]; 2260 2260 if ( $limit > 0 && count( $srcs ) >= $limit ) 2261 2261 break; … … 2311 2311 $galleries[] = $gallery; 2312 2312 } else { 2313 preg_match_all( '#src= [\'"](.+?)[\'"]#is', $gallery, $src, PREG_SET_ORDER );2313 preg_match_all( '#src=([\'"])(.+?)\1#is', $gallery, $src, PREG_SET_ORDER ); 2314 2314 if ( ! empty( $src ) ) { 2315 2315 foreach ( $src as $s ) 2316 $srcs[] = $s[ 1];2316 $srcs[] = $s[2]; 2317 2317 } 2318 2318 -
trunk/wp-includes/post-formats.php
r24233 r24241 792 792 return $trimmed; 793 793 // the content is HTML so we grab the first href 794 } elseif ( preg_match( '/<a\s[^>]*?href= [\'"](.+?)[\'"]/is', $content, $matches ) ) {795 return esc_url_raw( $matches[ 1] );794 } elseif ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) { 795 return esc_url_raw( $matches[2] ); 796 796 } 797 797
Note: See TracChangeset
for help on using the changeset viewer.