Opened 19 years ago
Closed 18 years ago
#5604 closed defect (bug) (duplicate)
the_excerpt should strip style tags
| Reported by: | sunburntkamel | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.5 |
| Severity: | normal | Keywords: | the_excerpt, flickr, style, has_patch, needs_testing |
| Cc: | Focuses: |
Description
the_excerpt prints <style> tags, rather than omitting them, causing unattractive excerpts.
example: http://archgfx.net/wordpress/?cat=1
the problem usually comes up in the context of posting from flickr.
Attachments (2)
Change History (9)
#2
@
19 years ago
- Component Template → General
- Keywords has_patch added
ignore the first patch, my tabs weren't set correctly.
#3
@
19 years ago
- Keywords the_excerpt flickr style has_patch → the_excerpt, flickr, style, has_patch
#5
@
19 years ago
I think filtering out everything between style tags (and CDATA) is a good idea, but it should probably be done for the content_save_pre filter, as this can also be a problem when someone posts by email, for example.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
it seems like wp_trim_excerpt might need something like this:
http://us.php.net/manual/en/function.strip-tags.php#71962
but i'm really not qualified to make a patch.