Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i have a little form to post:

$post_content = '"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."';

$post = array( 'post_author' => 1,
               'post_title' => 'title',
               'post_content' => $post_content,
               'post_category' => $categories,
               'post_type' => 'post'
             );

but, once my post is published shows :

&;Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…&;

please note the &;

I've tried to escape before like this:

\"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"

but still the same. Any ideas?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
$post_content = '"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."';

Try encoding special characters. See: http://www.w3schools.com/tags/ref_entities.asp & http://php.net/manual/en/function.htmlentities.php

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.