WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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.