Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#2554 closed defect (bug) (fixed)

Comments link title bug

Reported by: kpumuk's profile kpumuk Owned by: davidhouse's profile davidhouse
Milestone: Priority: normal
Severity: trivial Version: 2.0.2
Component: Template Keywords: bg|has-patch
Focuses: Cc:


In function comments_popup_link following construction used:

echo ' title="' . sprintf( __('Comment on %s'), $post->post_title ) .'">';

This is incorrect because it's possible to create plugin which filter title (for example, Polyglot)

I think you need to change this to something like:

echo ' title="' . sprintf( __('Comment on %s'), the_title('', '', false) ) .'">';

PS. Please add 2.0.2 version to Version combo box on "Create New Ticket" page.

Attachments (1)

2554.diff (577 bytes) - added by davidhouse 18 years ago.

Download all attachments as: .zip

Change History (5)

#1 @shorty114
18 years ago

  • Version changed from 2.0.1 to 2.0.2

Verified in latest (2.0.2).

File: wp-includes/comment-functions.php
Line: 331

Updated Version tag.

Can a dev verify that this is actually supposed to be as kpmunk says?

#2 @markjaquith
18 years ago

the_title() echoes, so that's not correct. Using get_the_title() would be better, but wouldn't fix the issue, because no filters are run on get_the_title()

The best fix might be to switch to get_the_title() and to create a new get_the_title filter. The filters on the echo-only functions are rather limited. There are many instances of get_the_something filters and I'd recommend using those, because they cover both return and echo instances of usage.

#3 @davidhouse
18 years ago

  • Keywords bg|has-patch added
  • Owner changed from anonymous to davidhouse
  • Status changed from new to assigned

No need for an extra filter.

18 years ago

#4 @mdawaffe
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

See #2625 (different bug with same fix).

Fixed in [3874] [3995].

Note: See TracTickets for help on using tickets.