WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#8981 closed defect (bug) (fixed)

allow filters to see raw title

Reported by: chineseleper Owned by:
Milestone: 2.7.2 Priority: normal
Severity: normal Version: 2.7
Component: Plugins Keywords: has-patch
Focuses: Cc:

Description

In /wp-includes/formatting.php

 481  function sanitize_title($title, $fallback_title = '') {
 482      $title = strip_tags($title);
 483      $title = apply_filters('sanitize_title', $title);

should be something like

 481  function sanitize_title($raw_title, $fallback_title = '') {
 482      $title = strip_tags($raw_title);
 483      $title = apply_filters('sanitize_title', $title, $raw_title);

I need this for qTranslate, qT adds XML-Comments to seperate languages, which get removed by strip_tags. Because of that, the title get mixed up with text from different languages.

Change History (3)

comment:1 @nbachiyski6 years ago

  • Keywords has-patch added

comment:2 @ryan6 years ago

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

(In [10804]) Pass the unprocessed title to the sanitize_title filter. Props chineseleper. fixes #8981 for trunk

comment:3 @ryan6 years ago

(In [10805]) Pass the unprocessed title to the sanitize_title filter. Props chineseleper. fixes #8981 for 2.7

Note: See TracTickets for help on using tickets.