Strip term name and description before preparing for DB.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1eac18dd69
commit
b4cdc4435d
|
@ -1033,6 +1033,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
|
|||
|
||||
// expected_slashed ($name)
|
||||
$name = stripslashes($name);
|
||||
$description = stripslashes($description);
|
||||
|
||||
if ( empty($slug) )
|
||||
$slug = sanitize_title($name);
|
||||
|
@ -1242,6 +1243,10 @@ function wp_update_term( $term, $taxonomy, $args = array() ) {
|
|||
$args = sanitize_term($args, $taxonomy, 'db');
|
||||
extract($args, EXTR_SKIP);
|
||||
|
||||
// expected_slashed ($name)
|
||||
$name = stripslashes($name);
|
||||
$description = stripslashes($description);
|
||||
|
||||
$empty_slug = false;
|
||||
if ( empty($slug) ) {
|
||||
$empty_slug = true;
|
||||
|
|
Loading…
Reference in New Issue