Greetins
I wish to insert posts coming from a CSV file
I have no problem to extract from the CSB
to insert datas in the DB I use
wp_insert_post( $my_post )
where $my_post is an array of the data I got from my CSV
I have some problme to "clean" my data before inserting, specially if they includes special characters
so far I use
$my_post['post_content']= funky_javascript_fix( $my_post['post_content'] );
$my_post['post_content']= wp_specialchars( stripslashes( $my_post['post_content'] ));
$my_post['post_content']= apply_filters( 'default_content', $my_post['post_content']);
but this does not solve my problme with datas containing for example
"&é'(-è_çà)"
this send me back an empty file when the post in inserted
I believe I need to sanitize those data before inserting, but honestly I'm quite lost on which functions I need to use to achieve that
so far I would like to sanitize datas for
-- post title
-- post content
-- categories
-- tags
-- metas
Thank you VERY much in advance
Steffy