[wp-trac] [WordPress Trac] #4149: wp_list_pages doesn't replace
special chars
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 14 23:04:16 GMT 2007
#4149: wp_list_pages doesn't replace special chars
----------------------+-----------------------------------------------------
Reporter: faebuch | Owner: anonymous
Type: defect | Status: new
Priority: low | Milestone: 2.1.4
Component: Template | Version: 2.1.1
Severity: trivial | Keywords: wp_list_pages, special chars
----------------------+-----------------------------------------------------
when using wp_list_pages, special chars in my page titles (in my case the
ampersand) ist not replaced. in the title attribute of the link the
replacment works.
e.g. my page "Nero & Zorro" ends in
<a href="http://www.faebu.ch/about-me/nero-zoro/" title="Nero &
Zoro">Nero & Zoro</a>
it fixed it for myself by adding the function wp_specialchars in class
Walker_page:
$output .= $indent . '<li class="' . $css_class . '"><a
href="' . get_page_link($page->ID) . '" title="' .
attribute_escape($page->post_title) . '">' .
wp_specialchars($page->post_title) . '</a>';
--
Ticket URL: <http://trac.wordpress.org/ticket/4149>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list