Use clean_url instead of inline preg. Props rob1n. fixes #3983 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@5068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0748c257f8
commit
809a88a918
|
@ -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 ) ) {
|
||||
|
|
Loading…
Reference in New Issue