php - how to manually insert string with html codes in wp_posts table -
i'm doing migration going wordpress , needed manual inserting of data wp_posts table. in inserting data, i'm using mysql_real_escape_string html attributes being inserted additional \" example :
#original <img src="imge.jpg" alt="abcde fghij"> #inserted wp_posts using mysql_real_escape_string <img src="\"imge.jpg"\" alt="\"abcde fghij"\"> this bad , makes images not working. need of how insert data wp_posts.post_content in way wordpress acceptable.
have tried use singe quote?? try this..
<img src='imge.jpg' alt='abcde fghij'>
Comments
Post a Comment