WordPress.org

Make WordPress Core

Ticket #2726: admin-functions.php.diff

File admin-functions.php.diff, 1.3 KB (added by CSiefkes, 12 years ago)

Patch that allows irc: links in the sidebar

  • admin-functions.php

    old new  
    370370                $user->user_email = wp_specialchars(trim($_POST['email']));
    371371        if (isset ($_POST['url'])) {
    372372                $user->user_url = wp_specialchars(trim($_POST['url']));
    373                 $user->user_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
     373                $user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
    374374        }
    375375        if (isset ($_POST['first_name']))
    376376                $user->first_name = wp_specialchars(trim($_POST['first_name']));
     
    480480                die(__("Cheatin' uh ?"));
    481481
    482482        $_POST['link_url'] = wp_specialchars($_POST['link_url']);
    483         $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];
     483        $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|irc|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];
    484484        $_POST['link_name'] = wp_specialchars($_POST['link_name']);
    485485        $_POST['link_image'] = wp_specialchars($_POST['link_image']);
    486486        $_POST['link_rss'] = wp_specialchars($_POST['link_rss']);