Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4149 closed defect (bug) (worksforme)

wp_list_pages doesn't replace special chars

Reported by: faebuch's profile faebuch Owned by: rob1n's profile 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 &#038; 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)

#1 @rob1n
17 years ago

  • Milestone changed from 2.1.4 to 2.2
  • Owner changed from anonymous to rob1n
  • Priority changed from low to normal
  • Severity changed from trivial to normal

2.2 is going to drop in less than a week.

#2 @rob1n
17 years ago

  • Milestone 2.2 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Can't reproduce in r5270. This probably means that it's been fixed since 2.1.1. It'll be fine in 2.2.

Note: See TracTickets for help on using tickets.