mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 23:25:50 +01:00
In sanitize_post_field()
, only run 'attribute' or 'js' escaping when necessary.
Props tfrommen. Fixes #34900. Built from https://develop.svn.wordpress.org/trunk@37220 git-svn-id: http://core.svn.wordpress.org/trunk@37186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
784a00d49c
commit
374a489166
@ -2139,12 +2139,13 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
|
|||||||
} else {
|
} else {
|
||||||
$value = apply_filters( "post_{$field}", $value, $post_id, $context );
|
$value = apply_filters( "post_{$field}", $value, $post_id, $context );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( 'attribute' == $context )
|
if ( 'attribute' == $context ) {
|
||||||
$value = esc_attr( $value );
|
$value = esc_attr( $value );
|
||||||
elseif ( 'js' == $context )
|
} elseif ( 'js' == $context ) {
|
||||||
$value = esc_js( $value );
|
$value = esc_js( $value );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-alpha-37219';
|
$wp_version = '4.6-alpha-37220';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user