Opened 18 years ago
Closed 18 years ago
#3755 closed defect (bug) (fixed)
wp_title function: filter post title before stripping tags
Reported by: | jhodgdon | Owned by: | rob1n |
---|---|---|---|
Milestone: | 2.2.1 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | filter, wp_title, strip_tags, has-patch |
Focuses: | Cc: |
Description
At least one plugin (Polyglot) uses special (fake HTML) tags for filtering purposes. In most places in WordPress, filters are called before stripping HTML tags out of titles. However, in the wp_title function, strip_tags is called before apply_filters, so the filtering does not work.
Patch about to be added...
Attachments (2)
Change History (10)
#5
@
18 years ago
- Cc jhodgdon added
- Resolution fixed deleted
- Status changed from closed to reopened
I just noticed that the way the patch was applied here, the function is still broken. The current file says ([5619] of general-template.php):
229 $title = apply_filters('single_post_title', $title);
230 $title = strip_tags($post->post_title);
As you can see, the second line overrides the first line. It should be (as it was in the original patch):
229 $title = apply_filters('single_post_title', $post->post_title);
230 $title = strip_tags($title);
I am submitting a new patch to fix this patch... will attach shortly...
Jennifer
Patch to wp_title function: strip tags after filtering post title