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:
parent
3e494326c4
commit
ff237a769f
|
@ -1265,7 +1265,7 @@ function next_posts_link($label='Next Page »', $max_page=0) {
|
|||
if (empty($p) && (empty($paged) || $nextpage <= $max_page)) {
|
||||
echo '<a href="';
|
||||
next_posts($max_page);
|
||||
echo '">'. htmlspecialchars($label) .'</a>';
|
||||
echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1301,7 +1301,7 @@ function previous_posts_link($label='« Previous Page') {
|
|||
if (empty($p) && ($paged > 1) && ($what_to_show == 'paged')) {
|
||||
echo '<a href="';
|
||||
previous_posts();
|
||||
echo '">'. htmlspecialchars($label) .'</a>';
|
||||
echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1317,7 +1317,7 @@ function posts_nav_link($sep=' :: ', $prelabel='<< Previous Page', $nxtlabel='Ne
|
|||
$max_page = ceil($numposts / $posts_per_page);
|
||||
if ($max_page > 1) {
|
||||
previous_posts_link($prelabel);
|
||||
echo htmlspecialchars($sep);
|
||||
echo preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $sep);
|
||||
next_posts_link($nxtlabel, $max_page);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue