bette rhandling of HTML entities in preview/next posts links

git-svn-id: http://svn.automattic.com/wordpress/trunk@780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
alex_t_king 2004-01-15 22:11:13 +00:00
parent 3e494326c4
commit ff237a769f
1 changed files with 3 additions and 3 deletions

View File

@ -1265,7 +1265,7 @@ function next_posts_link($label='Next Page »', $max_page=0) {
if (empty($p) && (empty($paged) || $nextpage <= $max_page)) { if (empty($p) && (empty($paged) || $nextpage <= $max_page)) {
echo '<a href="'; echo '<a href="';
next_posts($max_page); next_posts($max_page);
echo '">'. htmlspecialchars($label) .'</a>'; echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
} }
} }
} }
@ -1301,7 +1301,7 @@ function previous_posts_link($label='&laquo; Previous Page') {
if (empty($p) && ($paged > 1) && ($what_to_show == 'paged')) { if (empty($p) && ($paged > 1) && ($what_to_show == 'paged')) {
echo '<a href="'; echo '<a href="';
previous_posts(); previous_posts();
echo '">'. htmlspecialchars($label) .'</a>'; echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
} }
} }
@ -1317,7 +1317,7 @@ function posts_nav_link($sep=' :: ', $prelabel='<< Previous Page', $nxtlabel='Ne
$max_page = ceil($numposts / $posts_per_page); $max_page = ceil($numposts / $posts_per_page);
if ($max_page > 1) { if ($max_page > 1) {
previous_posts_link($prelabel); previous_posts_link($prelabel);
echo htmlspecialchars($sep); echo preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $sep);
next_posts_link($nxtlabel, $max_page); next_posts_link($nxtlabel, $max_page);
} }
} }