Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767

git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren
2013-03-01 16:28:40 +00:00
parent 0bb47182a4
commit 43a7e695e9
89 changed files with 657 additions and 533 deletions

View File

@@ -39,9 +39,9 @@ function edit_link( $link_id = 0 ) {
if ( !empty( $link_id ) ) {
$_POST['link_id'] = $link_id;
return wp_update_link( wp_unslash( $_POST ) );
return wp_update_link( $_POST );
} else {
return wp_insert_link( wp_unslash( $_POST ) );
return wp_insert_link( $_POST );
}
}
@@ -55,12 +55,12 @@ function edit_link( $link_id = 0 ) {
function get_default_link_to_edit() {
$link = new stdClass;
if ( isset( $_GET['linkurl'] ) )
$link->link_url = esc_url( wp_unslash( $_GET['linkurl'] ) );
$link->link_url = esc_url( $_GET['linkurl'] );
else
$link->link_url = '';
if ( isset( $_GET['name'] ) )
$link->link_name = esc_attr( wp_unslash( $_GET['name'] ) );
$link->link_name = esc_attr( $_GET['name'] );
else
$link->link_name = '';
@@ -137,7 +137,7 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
$linkdata = wp_parse_args( $linkdata, $defaults );
$linkdata = sanitize_bookmark( $linkdata, 'db' );
extract( $linkdata, EXTR_SKIP );
extract( stripslashes_deep( $linkdata ), EXTR_SKIP );
$update = false;
@@ -250,6 +250,9 @@ function wp_update_link( $linkdata ) {
$link = get_bookmark( $link_id, ARRAY_A );
// Escape data pulled from DB.
$link = add_magic_quotes( $link );
// Passed link category list overwrites existing category list if not empty.
if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] )
&& 0 != count( $linkdata['link_category'] ) )