[wp-trac] [WordPress Trac] #16463: the_title_attribute() bug
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 5 12:56:22 UTC 2011
#16463: the_title_attribute() bug
--------------------------+------------------------------------------------
Reporter: facemann_ru | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.0.4
Severity: normal | Keywords: get_the_title, the_title_attribute
--------------------------+------------------------------------------------
Hi, this bug appears when you try to use HTML for options as 'before' or
'after' on function '''the_title_attribute();'''
http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/post-
template.php#L74
An example from docs doesn't work:
http://codex.wordpress.org/Function_Reference/the_title_attribute
{{{
<?php the_title_attribute('before=<h3>&after=</h3>'); ?>
}}}
One of the solutions - we can move below the first line of this code:
{{{
$title = $before . $title . $after;
$title = esc_attr(strip_tags($title));
}}}
So, HTML from options won't be stripped.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16463>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list