#6 closed defect (bug) (fixed)
the_excerpt() on non-excerpt posts doesn't stripslashes
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Template | Version: | |
| Severity: | minor | Keywords: | |
| Cc: |
Description
In trying to use the th_excerpt() function of WP, I noticed that my tick marks were still escaped. The key to this is that there was no excerpt entered for the posts.
Review of the code revealed that if there is an excerpt, it gets stripslashes, but when there is no exceprt, it attempts to use the post content. The check for empty excerpt isn't done until after the call to stripslashes. this means that when the content is used, it doesn't go through the stripslashes, causing them to show in the "faked" excerpt.
Change History (6)
comment:1
anonymousbugger — 9 years ago
- Owner changed from anonymous to rboren
- Status changed from new to assigned
I guess I should have mentioned that I am using 1.2 Mingus...
Ok, if it's fixed in the CVS, I'll grab that file and see if the problem persists. The note about older versions of WP probably holds true for my case too. Ahhhh the joys of development.
TG
- Resolution changed from 10 to 20
- Status changed from assigned to closed
Resolving. There isn't really one file that will fix this. The changes are widespread. I'll create a separate bug to track the problem with extra slashes in old posts.

I cannot reproduce this with CVS. stripslashes should not be necessary. We'll be removing almost every call to stripslashes sometime soon. Posts saved with older versions of Wordpress had double slashes added to them. These old posts will show up with slashes. A script to strip extra slashes present in old posts is in the works.
edited on: 06-11-04 11:00