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:
parent
b3727f5cb0
commit
2c7201f057
|
@ -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