Support » Fixing WordPress » the_content() filter adds corrupt quotes to my shortcodes (with wp-ajax)

  • Hi πŸ™‚
    I know thats a very special problem but it should affect other theme and plugin developers.

    In WordPress 4.0.1 if i apply the_content() filter and then send the result via ajax as json to my site, my shortcodes (and strangely only my shortcodes) get corrupt quotes.

    Here is an example:
    thats a snippet how my filter gets applied (it gets echoed via ajax)
    $output = apply_filters(‘the_content’, $content);
    $json_output[‘html’] = $output;
    echo json_encode($json_output);

    Now if the content i receive: (an example)
    <div class=”test” id=”testid”>[shortcode arg=”value” foo=”bar”][/shortcode]</div>

    There you see the curropt quotes… i have alot of quotes in my content but only the shortcodes are getting destroyed.

    Any help would be great!

    If you need additional info just ask. πŸ™‚

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘the_content() filter adds corrupt quotes to my shortcodes (with wp-ajax)’ is closed to new replies.