Changeset 31635 for trunk/src/wp-admin/includes/class-wp-press-this.php
- Timestamp:
- 03/06/2015 01:16:53 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-press-this.php
r31609 r31635 335 335 336 336 if ( is_numeric( $value ) || is_bool( $value ) ) { 337 $return = (string)$value;337 $return = $value; 338 338 } else if ( is_string( $value ) ) { 339 339 if ( mb_strlen( $value ) > 5000 ) { … … 354 354 return ''; 355 355 } 356 356 357 357 $url = $this->_limit_string( $url ); 358 358 … … 420 420 } else if ( preg_match( '/\/\/vine\.co\/v\/([^\/]+)\/embed/', $src, $src_matches ) ) { 421 421 $src = 'https://vine.co/v/' . $src_matches[1]; 422 } else if ( preg_match( '/\/\/(www\.)?dailymotion\.com\/embed\/video\/([^\/\?]+)([\/\?]{1}.+)?/', $src, $src_matches ) ) { 423 $src = 'https://www.dailymotion.com/video/' . $src_matches[2]; 422 424 } else if ( ! preg_match( '/\/\/(m\.|www\.)?youtube\.com\/watch\?/', $src ) 423 425 && ! preg_match( '/\/youtu\.be\/.+$/', $src ) … … 471 473 } 472 474 } 473 475 474 476 return $data; 475 477 } … … 638 640 639 641 foreach ( $items as $key => $value ) { 640 $key = $this->_limit_string( wp_unslash( $key ) ); 641 642 // Sanity check. $key is usually things like 'title', 'description', 'keywords', etc. 643 if ( empty( $key ) || strlen( $key ) > 100 ) { 644 continue; 642 if ( ! is_numeric( $key ) ) { 643 $key = $this->_limit_string( wp_unslash( $key ) ); 644 645 // Sanity check. $key is usually things like 'title', 'description', 'keywords', etc. 646 if ( empty( $key ) || strlen( $key ) > 100 ) { 647 continue; 648 } 645 649 } 646 650
Note: See TracChangeset
for help on using the changeset viewer.