WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 days ago

#20202 closed defect (bug) (fixed)

Filter pre_post_type with sanitize_key()

Reported by: duck_ Owned by: duck_
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

Currently the post_type field is sanitized with sanitize_user(). It would make more sense to use sanitize_key() for this because

  1. register_post_type() uses sanitize_key()
  2. It's a lighter function

See #14910.

Attachments (1)

20202.diff (611 bytes) - added by duck_ 9 years ago.

Download all attachments as: .zip

Change History (3)

@duck_
9 years ago

#1 @duck_
9 years ago

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

In [20234]:

Pass post_type through sanitize_key() instead of sanitize_user(). Fixes #20202.

For consistency with the registration API and because it does less work.

This ticket was mentioned in Slack in #core-committers by iandunn. View the logs.


9 days ago

Note: See TracTickets for help on using tickets.