WordPress.org

Make WordPress Core

Ticket #3983: 3983-branch2.0.diff

File 3983-branch2.0.diff, 895 bytes (added by rob1n, 7 years ago)

For the 2.0 branch.

  • wp-admin/admin-functions.php

     
    502502                die(__("Cheatin' uh ?")); 
    503503 
    504504        $_POST['link_url'] = wp_specialchars($_POST['link_url']); 
    505         $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url']; 
     505        $_POST['link_url'] = clean_url($_POST['link_url']); 
    506506        $_POST['link_name'] = wp_specialchars($_POST['link_name']); 
    507507        $_POST['link_image'] = wp_specialchars($_POST['link_image']); 
    508         $_POST['link_rss'] = wp_specialchars($_POST['link_rss']); 
     508        $_POST['link_rss'] = clean_url($_POST['link_rss']); 
    509509        $auto_toggle = get_autotoggle($_POST['link_category']); 
    510510         
    511511        // if we are in an auto toggle category and this one is visible then we