WordPress.org

Make WordPress Core

Changeset 5069


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/wp-admin/admin-functions.php

    r5057 r5069  
    600600
    601601    $_POST['link_url'] = wp_specialchars( $_POST['link_url'] );
    602     $_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'];
     602    $_POST['link_url'] = clean_url($_POST['link_url']);
    603603    $_POST['link_name'] = wp_specialchars( $_POST['link_name'] );
    604604    $_POST['link_image'] = wp_specialchars( $_POST['link_image'] );
    605     $_POST['link_rss'] = wp_specialchars( $_POST['link_rss'] );
     605    $_POST['link_rss'] = clean_url($_POST['link_rss']);
    606606    $_POST['link_category'] = $_POST['post_category'];
    607607
Note: See TracChangeset for help on using the changeset viewer.