How can I stop wp_update_post messing up HTML example code?
It was https://wordpress.org/plugins/syntaxhighlighter/ plugin’s fault. There are some functions in it that have something to do with this, namely encode_shortcode_contents_slashed_noquickedit, encode_shortcode_contents_callback. Now I replaced it to https://wordpress.org/plugins/crayon-syntax-highlighter/ but by the time I confirmed it was the other plugin’s fault I had already written a solution. function wpse190396_insert_post_data($data, $postarr){ if($postarr[‘filter’] == ‘db’ && ($data[‘post_type’] == ‘fix’ … Read more