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

git-svn-id: https://develop.svn.wordpress.org/trunk@5068 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-03-21 03:58:31 +00:00
parent b3727f5cb0
commit 2c7201f057
1 changed files with 2 additions and 2 deletions

View File

@ -611,10 +611,10 @@ function edit_link( $link_id = '' ) {
wp_die( __( 'Cheatin’ uh?' ));
$_POST['link_url'] = wp_specialchars( $_POST['link_url'] );
$_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'];
$_POST['link_url'] = clean_url($_POST['link_url']);
$_POST['link_name'] = wp_specialchars( $_POST['link_name'] );
$_POST['link_image'] = wp_specialchars( $_POST['link_image'] );
$_POST['link_rss'] = wp_specialchars( $_POST['link_rss'] );
$_POST['link_rss'] = clean_url($_POST['link_rss']);
$_POST['link_category'] = $_POST['post_category'];
if ( !empty( $link_id ) ) {