Opened 17 years ago
Closed 17 years ago
#4149 closed defect (bug) (worksforme)
wp_list_pages doesn't replace special chars
Reported by: | faebuch | Owned by: | rob1n |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.1.1 |
Component: | Template | Keywords: | wp_list_pages, special chars |
Focuses: | Cc: |
Description
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>';
Change History (2)
Note: See
TracTickets for help on using
tickets.
2.2 is going to drop in less than a week.