Make WordPress Core


Ignore:
Timestamp:
04/27/2004 01:24:47 PM (22 years ago)
Author:
saxmatt
Message:

Fixes from forum thread: ​http://wordpress.org/support/6/4615.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r1143 r1187  
    123123        die (__('Cheatin’ uh?'));
    124124   
    125     $cat_name = addslashes(stripslashes(stripslashes($_POST['cat_name'])));
    126     $cat_ID = addslashes($_POST['cat_ID']);
     125    $cat_name = $wpdb->escape(stripslashes($_POST['cat_name']));
     126    $cat_ID = (int) $_POST['cat_ID'];
    127127    $category_nicename = sanitize_title($cat_name);
    128     $category_description = $_POST['category_description'];
     128    $category_description = $wpdb->escape(stripslashes($_POST['category_description']));
    129129
    130130    $wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
Note: See TracChangeset for help on using the changeset viewer.