From 139fa55165f3cdcbc19443f2aa800fd898404071 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 21 Mar 2007 04:28:53 +0000 Subject: [PATCH] Use clean_url instead of inline preg. Props rob1n. fixes #3983 for 2.0 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@5070 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 975975d235..cae9797165 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -502,10 +502,10 @@ function edit_link($link_id = '') { die(__("Cheatin' uh ?")); $_POST['link_url'] = wp_specialchars($_POST['link_url']); - $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/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']); $auto_toggle = get_autotoggle($_POST['link_category']); // if we are in an auto toggle category and this one is visible then we