Make WordPress Core

Changeset 23575


Ignore:
Timestamp:
03/01/2013 05:56:31 PM (11 years ago)
Author:
nacin
Message:

Assume that url_shorten() receives unslashed data, as it does in core usage. see #21767.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r23563 r23575  
    221221 */
    222222function url_shorten( $url ) {
    223     $short_url = str_replace( 'http://', '', wp_unslash( $url ));
    224     $short_url = str_replace( 'www.', '', $short_url );
     223    $short_url = str_replace( array( 'http://', 'www.' ), '', $short_url );
    225224    $short_url = untrailingslashit( $short_url );
    226225    if ( strlen( $short_url ) > 35 )
Note: See TracChangeset for help on using the changeset viewer.