I am also in the process of importing messages with s in the content body. I searched all morning for a solution, there were some discussions on this topic. until
kses_remove_filters();
Did nothing for me, did not comment on these two lines:
unset( $postarr[ 'filter' ] ); // overrides 'filter' => true since 3.0 i guess $postarr = sanitize_post($postarr, 'db');
in wp_insert_post () in post.php (defaults to line 2704).
There is another interesting bit on line 2874:
$data = apply_filters('wp_insert_post_data', $data, $postarr);
which seems to be the source of our problems, but Iβm too much a beginner to figure it out on my own.
really, really, desperately need help! oh, and I canβt comment, sorry for the effect of spam. I would like to leave this thread open and find a solution.
I think this worked before I posted it, but the content that I imported already had HTML tags, the easiest way would be to manually overwrite the content after inserting the message, but this only works for sandboxes or for import
$wpdb->update($wpdb->posts, array("post_content"=>$content->content), array("ID"=>$postid), array("%s"), array("%d"));
anyway,
remove_all_filters("content_save_pre");
did the trick!