WordPress.org

Make WordPress Core

Ticket #3983: 3983.2.diff

File 3983.2.diff, 885 bytes (added by rob1n, 11 years ago)

Take out empty check.

  • wp-admin/admin-functions.php

     
    611611                wp_die( __( 'Cheatin’ uh?' ));
    612612
    613613        $_POST['link_url'] = wp_specialchars( $_POST['link_url'] );
    614         $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];
     614        $_POST['link_url'] = clean_url($_POST['link_url']);
    615615        $_POST['link_name'] = wp_specialchars( $_POST['link_name'] );
    616616        $_POST['link_image'] = wp_specialchars( $_POST['link_image'] );
    617         $_POST['link_rss'] = wp_specialchars( $_POST['link_rss'] );
     617        $_POST['link_rss'] = clean_url($_POST['link_rss']);
    618618        $_POST['link_category'] = $_POST['post_category'];
    619619
    620620        if ( !empty( $link_id ) ) {