[wp-cvs] wordpress/wp-includes template-functions-general.php, 1.40, 1.41

Ryan Boren rboren at users.sourceforge.net
Wed Jul 28 23:09:36 UTC 2004


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

Modified Files:
	template-functions-general.php 
Log Message:
Run htmlspecialchars on title attribute text in get_archives_link().  Bug 0000162.

Index: template-functions-general.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-general.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** template-functions-general.php	28 Jul 2004 03:30:15 -0000	1.40
--- template-functions-general.php	28 Jul 2004 23:09:33 -0000	1.41
***************
*** 195,206 ****
  function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
  	$text = wptexturize($text);
  	if ('link' == $format) {
! 		return "\t<link rel='archives' title='$text' href='$url' />\n";
  	} elseif ('option' == $format) {
  		return "\t<option value='$url'>$text</option>\n";
  	} elseif ('html' == $format) {
! 		return "\t<li>$before<a href='$url' title='$text'>$text</a>$after</li>\n";
  	} else { // custom
! 		return "\t$before<a href='$url' title='$text'>$text</a>$after\n";
  	}
  }
--- 195,208 ----
  function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
  	$text = wptexturize($text);
+     $title_text = htmlspecialchars($text);
+ 
  	if ('link' == $format) {
! 		return "\t<link rel='archives' title='$title_text' href='$url' />\n";
  	} elseif ('option' == $format) {
  		return "\t<option value='$url'>$text</option>\n";
  	} elseif ('html' == $format) {
! 		return "\t<li>$before<a href='$url' title='$title_text'>$text</a>$after</li>\n";
  	} else { // custom
! 		return "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
  	}
  }




More information about the cvs mailing list