[wp-trac] [WordPress Trac] #16463: the_title_attribute() bug

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 5 13:23:12 UTC 2011

#16463: the_title_attribute() bug
 Reporter:  facemann_ru        |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Template           |     Version:  3.0.4
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
Changes (by dd32):

 * keywords:  has-patch => reporter-feedback
 * component:  General => Template


 Where are you trying to use this function?

 It's not supposed to output html, thus the 'attribute' part of the
 function name.

 This function is designed to be used in this context:
 <a href="" title="<?php the_title_attribute(); ?>">
 In that context, HTML is invalid and should be striped from the output.

 It sounds like you should be using `the_title();` function instead to me..

Ticket URL: <http://core.trac.wordpress.org/ticket/16463#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list