[wp-trac] [WordPress Trac] #17217: Walker_PageDropdown doesn't filter titles correctly
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 22 17:03:30 UTC 2011
#17217: Walker_PageDropdown doesn't filter titles correctly
--------------------------+------------------------------
Reporter: Otto42 | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: Awaiting Review
Component: Security | Version: 3.1
Severity: major | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Description changed by Otto42:
Old description:
> The Walker_PageDropdown has this code:
>
> `$title = esc_html($page->post_title);
> $title = apply_filters( 'list_pages', $page->post_title );`
>
> Meaning that the esc_html is not applied properly, since $title just gets
> replaces with the $post_title again.
>
> Fix is this:
> `$title = esc_html($page->post_title);
> $title = apply_filters( 'list_pages', $title );`
>
> Patch attached.
New description:
The Walker_PageDropdown has this code:
{{{
$title = esc_html($page->post_title);
$title = apply_filters( 'list_pages', $page->post_title );
}}}
Meaning that the esc_html is not applied properly, since $title just gets
replaces with the $post_title again.
Fix is this:
{{{
$title = esc_html($page->post_title);
$title = apply_filters( 'list_pages', $title );
}}}
Patch attached.
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17217#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list