WordPress.org

Make WordPress Core

Changeset 5068


Ignore:
Timestamp:
03/21/2007 03:58:31 AM (11 years ago)
Author:
ryan
Message:

Use clean_url instead of inline preg. Props rob1n. fixes #3983 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r5056 r5068  
    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
Note: See TracChangeset for help on using the changeset viewer.