| 1 | Index: wp-includes/category.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/category.php (revision 12129) |
|---|
| 4 | +++ wp-includes/category.php (working copy) |
|---|
| 5 | @@ -351,15 +351,17 @@ |
|---|
| 6 | $category->cat_ID = &$category->term_id; |
|---|
| 7 | $category->category_count = &$category->count; |
|---|
| 8 | $category->category_description = &$category->description; |
|---|
| 9 | - $category->cat_name = &$category->name; |
|---|
| 10 | - $category->category_nicename = &$category->slug; |
|---|
| 11 | + $category->cat_name = esc_attr(&$category->name); |
|---|
| 12 | + $category->category_nicename = esc_attr(apply_filters('editable_slug',&$category->slug)); |
|---|
| 13 | + $category->slug = esc_attr(apply_filters('editable_slug',&$category->slug)); |
|---|
| 14 | $category->category_parent = &$category->parent; |
|---|
| 15 | } elseif ( is_array( $category ) && isset( $category['term_id'] ) ) { |
|---|
| 16 | $category['cat_ID'] = &$category['term_id']; |
|---|
| 17 | $category['category_count'] = &$category['count']; |
|---|
| 18 | $category['category_description'] = &$category['description']; |
|---|
| 19 | - $category['cat_name'] = &$category['name']; |
|---|
| 20 | - $category['category_nicename'] = &$category['slug']; |
|---|
| 21 | + $category['cat_name'] = esc_attr(apply_filters('editable_slug',&$category['name'])); |
|---|
| 22 | + $category['category_nicename'] = esc_attr(apply_filters('editable_slug',&$category['slug'])); |
|---|
| 23 | + $category['slug'] = esc_attr(&$category['slug']); |
|---|
| 24 | $category['category_parent'] = &$category['parent']; |
|---|
| 25 | } |
|---|
| 26 | } |
|---|