I'm doing migration going to wordpress and needed manual inserting of data to wp_posts table. In inserting the data, I'm using mysql_real_escape_string but html attributes being inserted with additional \" example :
#Original
<img src="imge.jpg" alt="abcde fghij">
#Inserted to wp_posts using mysql_real_escape_string
<img src="\"imge.jpg"\" alt="\"abcde fghij"\">
This is bad and makes the images not working. So I need help of how to insert data to wp_posts.post_content in a way that wordpress acceptable.
PDO way of saving the data fixed this issue.
have you tried to use singe quote?? try this..
It will not add any slice or anything else.You need to use this function for adding the image content and other.
Thanking you.