Opened 11 years ago
Closed 10 years ago
#30389 closed defect (bug) (duplicate)
Scheduled posts delete iframes (filter HTML) on publish
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Posts, Post Types | Keywords: | 2nd-opinion reporter-feedback |
Focuses: | Cc: |
Description
This is a follow-up to #22944. I have noticed this bug in WordPress 4.0, it's identical to the one in the mentioned ticket.
Change History (4)
#1
@
11 years ago
#2
follow-up:
↓ 4
@
10 years ago
- Keywords 2nd-opinion reporter-feedback added
While I was able to duplicate your issue with your code, I do not feel that this is a WP Core issue.
The disconnect happens at wp_update_post() in your code where content gets sanitized. You could remove the 'content_save_pre' filter prior to wp_update_post() to resolve your issue.
remove_filter('content_save_pre', 'wp_filter_post_kses'); wp_update_post( array('ID' => $post_id, 'post_content' => $content) ); add_filter('content_save_pre', 'wp_filter_post_kses');
#4
in reply to:
↑ 2
@
10 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Replying to collinsinternet:
While I was able to duplicate your issue with your code, I do not feel that this is a WP Core issue.
This is definitely a core issue.
This is a duplicate of #19373.
In addition, the tests added in [1174/tests] aren't adequate because the current user object is present, unlike when scheduled posts are published via WP-Cron.
I discovered it's being caused by a plugin that I wrote but here is the code for the plugin (slightly refactored). Obviously this code should do almost nothing as presented here.