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:
ryan 2007-10-26 19:44:57 +00:00
parent 1eac18dd69
commit b4cdc4435d
1 changed files with 5 additions and 0 deletions

View File

@ -1033,6 +1033,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
// expected_slashed ($name) // expected_slashed ($name)
$name = stripslashes($name); $name = stripslashes($name);
$description = stripslashes($description);
if ( empty($slug) ) if ( empty($slug) )
$slug = sanitize_title($name); $slug = sanitize_title($name);
@ -1242,6 +1243,10 @@ function wp_update_term( $term, $taxonomy, $args = array() ) {
$args = sanitize_term($args, $taxonomy, 'db'); $args = sanitize_term($args, $taxonomy, 'db');
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
// expected_slashed ($name)
$name = stripslashes($name);
$description = stripslashes($description);
$empty_slug = false; $empty_slug = false;
if ( empty($slug) ) { if ( empty($slug) ) {
$empty_slug = true; $empty_slug = true;