Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8981 closed defect (bug) (fixed)

allow filters to see raw title

Reported by: chineseleper Owned by:
Priority: normal Milestone: 2.7.2
Component: Plugins Version: 2.7
Severity: normal Keywords: has-patch
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)

  • Keywords has-patch added

comment:2   ryan4 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   ryan4 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.