mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 21:00:59 +01:00
Use clean_url instead of inline preg. Props rob1n. fixes #3983 for 2.1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@5069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b53405b8e3
commit
bcb9b83494
@ -599,10 +599,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
Block a user