[wp-cvs] wordpress wp-comments-popup.php, 1.18, 1.19 wp-comments.php, 1.27, 1.28 wp-links-opml.php, 1.8, 1.9 wp-trackback.php, 1.25, 1.26 xmlrpc.php, 1.32, 1.33

Matthew Mullenweg saxmatt at users.sourceforge.net
Sun Dec 12 20:41:19 UTC 2004


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

Modified Files:
	wp-comments-popup.php wp-comments.php wp-links-opml.php 
	wp-trackback.php xmlrpc.php 
Log Message:
Axing htmlspecialchars because it double-encodes-encodes. Better error handling around queries.

Index: xmlrpc.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/xmlrpc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** xmlrpc.php	12 Dec 2004 18:27:31 -0000	1.32
--- xmlrpc.php	12 Dec 2004 20:41:16 -0000	1.33
***************
*** 764,769 ****
  	      $struct['description'] = $cat['cat_name'];
  	      $struct['categoryName'] = $cat['cat_name'];
! 	      $struct['htmlUrl'] = htmlspecialchars(get_category_link(false, $cat['cat_ID'], $cat['cat_name']));
! 	      $struct['rssUrl'] = htmlspecialchars(get_category_rss_link(false, $cat['cat_ID'], $cat['cat_name']));
  
  	      $categories_struct[] = $struct;
--- 764,769 ----
  	      $struct['description'] = $cat['cat_name'];
  	      $struct['categoryName'] = $cat['cat_name'];
! 	      $struct['htmlUrl'] = wp_specialchars(get_category_link(false, $cat['cat_ID'], $cat['cat_name']));
! 	      $struct['rssUrl'] = wp_specialchars(get_category_rss_link(false, $cat['cat_ID'], $cat['cat_name']));
  
  	      $categories_struct[] = $struct;
***************
*** 1214,1218 ****
  		$original_context = strip_tags($context);
  		$context = '[...] ';
! 		$context = htmlspecialchars($original_context);
  		$context .= ' [...]';
  		$original_pagelinkedfrom = $pagelinkedfrom;
--- 1214,1218 ----
  		$original_context = strip_tags($context);
  		$context = '[...] ';
! 		$context = wp_specialchars($original_context);
  		$context .= ' [...]';
  		$original_pagelinkedfrom = $pagelinkedfrom;

Index: wp-links-opml.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-links-opml.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** wp-links-opml.php	30 Aug 2004 07:16:39 -0000	1.8
--- wp-links-opml.php	12 Dec 2004 20:41:16 -0000	1.9
***************
*** 44,53 ****
               } // end if not first time
  ?>
!         <outline type="category" title="<?php echo(htmlspecialchars(stripslashes($result->cat_name))) ?>">
  <?php
               $prev_cat_id = $result->link_category;
          } // end if new category
  ?>
!             <outline title="<?php echo(htmlspecialchars(stripslashes($result->link_name))) ?>" type="link" xmlUrl="<?php echo $result->link_rss; ?>" htmlUrl="<?php echo($result->link_url) ?>"/>
  <?php
          } // end foreach
--- 44,53 ----
               } // end if not first time
  ?>
!         <outline type="category" title="<?php echo wp_specialchars($result->cat_name); ?>">
  <?php
               $prev_cat_id = $result->link_category;
          } // end if new category
  ?>
!             <outline title="<?php echo wp_specialchars($result->link_name); ?>" type="link" xmlUrl="<?php echo $result->link_rss; ?>" htmlUrl="<?php echo($result->link_url) ?>"/>
  <?php
          } // end foreach

Index: wp-trackback.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-trackback.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** wp-trackback.php	8 Dec 2004 01:00:12 -0000	1.25
--- wp-trackback.php	12 Dec 2004 20:41:16 -0000	1.26
***************
*** 83,91 ****
  		trackback_response(1, 'Sorry, trackbacks are closed for this item.');
  
! 	$title = strip_tags( htmlspecialchars( $title ) );
  	$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
  	$excerpt = strip_tags($excerpt);
  	$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
! 	$blog_name = htmlspecialchars($blog_name);
  	$blog_name = (strlen($blog_name) > 250) ? substr($blog_name, 0, 250) . '...' : $blog_name;
  
--- 83,91 ----
  		trackback_response(1, 'Sorry, trackbacks are closed for this item.');
  
! 	$title =  wp_specialchars( strip_tags( $title ) );
  	$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
  	$excerpt = strip_tags($excerpt);
  	$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
! 	$blog_name = wp_specialchars($blog_name);
  	$blog_name = (strlen($blog_name) > 250) ? substr($blog_name, 0, 250) . '...' : $blog_name;
  

Index: wp-comments.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** wp-comments.php	15 Nov 2004 17:09:30 -0000	1.27
--- wp-comments.php	12 Dec 2004 20:41:16 -0000	1.28
***************
*** 42,46 ****
  	   <label for="author"><?php _e('Name'); ?></label> <?php if ($req) _e('(required)'); ?>
  	<input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />
! 	<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" />
  	</p>
  
--- 42,46 ----
  	   <label for="author"><?php _e('Name'); ?></label> <?php if ($req) _e('(required)'); ?>
  	<input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />
! 	<input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?>" />
  	</p>
  

Index: wp-comments-popup.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-popup.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** wp-comments-popup.php	15 Nov 2004 17:09:30 -0000	1.18
--- wp-comments-popup.php	12 Dec 2004 20:41:16 -0000	1.19
***************
*** 64,68 ****
  	   <label for="author"><?php _e("Name"); ?></label>
  	<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
! 	<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" />
  	</p>
  
--- 64,68 ----
  	   <label for="author"><?php _e("Name"); ?></label>
  	<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
! 	<input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER["REQUEST_URI"]); ?>" />
  	</p>
  




More information about the cvs mailing list