Changeset 1940 for trunk/wp-admin/categories.php
- Timestamp:
- 12/12/2004 08:41:19 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/categories.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r1930 r1940 27 27 die (__('Cheatin’ uh?')); 28 28 29 $cat_name= $_POST['cat_name'];29 $cat_name= wp_specialchars($_POST['cat_name']); 30 30 $id_result = $wpdb->get_row("SHOW TABLE STATUS LIKE '$wpdb->categories'"); 31 31 $cat_ID = $id_result->Auto_increment; … … 65 65 66 66 require_once ('admin-header.php'); 67 $cat_ID = intval($_GET['cat_ID']);67 $cat_ID = (int) $_GET['cat_ID']; 68 68 $category = $wpdb->get_row("SELECT * FROM $wpdb->categories WHERE cat_ID = '$cat_ID'"); 69 69 $cat_name = $category->cat_name; … … 76 76 <tr> 77 77 <th width="33%" scope="row"><?php _e('Category name:') ?></th> 78 <td width="67%"><input name="cat_name" type="text" value="<?php echo htmlspecialchars($cat_name); ?>" size="40" /> <input type="hidden" name="action" value="editedcat" />78 <td width="67%"><input name="cat_name" type="text" value="<?php echo wp_specialchars($cat_name); ?>" size="40" /> <input type="hidden" name="action" value="editedcat" /> 79 79 <input type="hidden" name="cat_ID" value="<?php echo $cat_ID ?>" /></td> 80 80 </tr> 81 81 <tr> 82 82 <th scope="row"><?php _e('Category slug:') ?></th> 83 <td><input name="category_nicename" type="text" value="<?php echo htmlspecialchars($category->category_nicename); ?>" size="40" /></td>83 <td><input name="category_nicename" type="text" value="<?php echo wp_specialchars($category->category_nicename); ?>" size="40" /></td> 84 84 </tr> 85 85 <tr> … … 93 93 <tr> 94 94 <th scope="row"><?php _e('Description:') ?></th> 95 <td><textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo htmlspecialchars($category->category_description, ENT_NOQUOTES); ?></textarea></td>95 <td><textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->category_description, 1); ?></textarea></td> 96 96 </tr> 97 97 </table> … … 108 108 die (__('Cheatin’ uh?')); 109 109 110 $cat_name = $_POST['cat_name'];110 $cat_name = wp_specialchars($_POST['cat_name']); 111 111 $cat_ID = (int) $_POST['cat_ID']; 112 112 $category_nicename = sanitize_title($_POST['category_nicename'], $cat_ID);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)