[wp-cvs] wordpress/wp-admin admin-functions.php, 1.32, 1.33 categories.php, 1.33, 1.34

Jason Verber jverber at users.sourceforge.net
Sat Jun 19 03:57:59 UTC 2004


Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27132/wp-admin

Modified Files:
	admin-functions.php categories.php 
Log Message:
Fix for bug 0000091: fixed encoding of special chars.

Index: categories.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/categories.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** categories.php	15 Jun 2004 23:24:35 -0000	1.33
--- categories.php	19 Jun 2004 03:57:57 -0000	1.34
***************
*** 99,103 ****
          <input type="hidden" name="cat_ID" value="<?php echo $_GET['cat_ID'] ?>" />
          <p><?php _e('Category name:') ?><br />
!         <input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
          <p><?php _e('Category parent:') ?><br />
          <select name='cat' class='postform'>
--- 99,103 ----
          <input type="hidden" name="cat_ID" value="<?php echo $_GET['cat_ID'] ?>" />
          <p><?php _e('Category name:') ?><br />
!         <input type="text" name="cat_name" value="<?php echo htmlspecialchars($cat_name); ?>" /></p>
          <p><?php _e('Category parent:') ?><br />
          <select name='cat' class='postform'>

Index: admin-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-functions.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** admin-functions.php	18 Jun 2004 00:22:03 -0000	1.32
--- admin-functions.php	19 Jun 2004 03:57:57 -0000	1.33
***************
*** 114,117 ****
--- 114,118 ----
  		foreach ($categories as $category) {
  			if ($category->category_parent == $parent) {
+ 				$category->cat_name = htmlspecialchars($category->cat_name);
  				$count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID");
  				$pad = str_repeat('&#8212; ', $level);
***************
*** 140,143 ****
--- 141,145 ----
  			$count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID");
  			$pad = str_repeat('&#8211; ', $level);
+ 			$category->cat_name = htmlspecialchars($category->cat_name);
  			echo "\n\t<option value='$category->cat_ID'";
  			if ($currentparent == $category->cat_ID)




More information about the cvs mailing list