Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11307 closed defect (bug) (fixed)

Better handling of posts without titles in Bulk Edit

Reported by: nacin's profile nacin Owned by:
Milestone: 3.0 Priority: low
Severity: minor Version: 2.9
Component: Quick/Bulk Edit Keywords: has-patch
Focuses: Cc:

Description

Start a Bulk Edit that includes a post with a single space for a title (which is shown as "(no title)"), and the Bulk Edit title won't display it as "(no title)".

That's because the title on the Edit screen is run through _draft_or_post_title, which checks get_the_title, running those filters (including trim).

On the other hand, the title in inline post data is simply $post->post_title. Patch attached to instead use get_the_title.

Patch doesn't use _draft_or_post_title() because that would add "(no title)" to a Quick Edit of a post without a title.

For reference, it's not as edge of a case as you might think. Somehow, a line break made its way into the title field, so the title looked empty, and get_the_title evaluated it to empty, but $post->post_title didn't echo it as empty.

Attachments (1)

11307_BulkEdit-notitle-fix.diff (758 bytes) - added by nacin 15 years ago.

Download all attachments as: .zip

Change History (2)

#1 @nacin
15 years ago

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

(In [13079]) Ensure post titles are consistently sanitized and filtered when displaying them in Bulk Edit, fixes #11307.

Note: See TracTickets for help on using tickets.