Title: &lt;![CDATA[ tag block structured data
Last modified: April 3, 2018

---

# <![CDATA[ tag block structured data

 *  Resolved [ulissse](https://wordpress.org/support/users/ulissse/)
 * (@ulissse)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/)
 * Hello,
 * I have microdata (Structured Data) on my website, and the AMP plugin correctly
   add it within the amp post but it automatically add <![CDATA[ just after the 
   first line like this :
 * ” <script type=”application/ld+json”><![CDATA[ ”
 * This additional tag added by AMP plugin cause a syntax error on Google that completely
   block all my structured data.
 * Can someone tell me how to remove this tag ?
 * Thank you for your help.
    -  This topic was modified 8 years, 3 months ago by [ulissse](https://wordpress.org/support/users/ulissse/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [ulissse](https://wordpress.org/support/users/ulissse/)
 * (@ulissse)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10141165)
 * Ok, here is a little more information about my trouble :
 * In fact, i had 2 schema scripts, one from my rating pluging and the other from
   the AMP plugin.
 * I have removed the structured data of the AMP plugin because it was not complete
   so i’m now with the structured data of the rating plugin but still can’t found
   how to remove the annoying tag <!CDATA[“”].
 * I hope someone can help me out with that.
 * ps: sorry for my bad English 🙁
 *  [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10142844)
 * **Fixed In The Next Version**
 * Hi [@ulissse](https://wordpress.org/support/users/ulissse/),
    Thanks for raising
   this, and we’ve also seen this issue 🙂
 * There’s a fix for this in the upcoming 0.7 release:
 * [https://github.com/Automattic/amp-wp/tree/0.7](https://github.com/Automattic/amp-wp/tree/0.7)
 * It’s now in Beta, and we’d appreciate you testing it if you can. But it’s not
   yet ready for a production site.
 * Here’s the pull request that fixed the issue:
    [https://github.com/Automattic/amp-wp/pull/891](https://github.com/Automattic/amp-wp/pull/891)
 * Thanks!
 *  Thread Starter [ulissse](https://wordpress.org/support/users/ulissse/)
 * (@ulissse)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10144502)
 * That’s great to hear, thank you, but in the meantime of the new release of the
   plugin is there a way to remove this CDATA ?
 * For exemple by adding something like this on the right place :
 * $string = str_replace(‘<![CDATA[‘,”,$string);
    $string = str_replace(‘]]>’,”,
   $string);
 * Thank you.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10146370)
 * You could try something like this:
 *     ```
       add_filter( 'amp_post_template_data', function( $data ) {
           $data['post_amp_content'] = str_replace( '<![CDATA[', '', $data['post_amp_content'] );
           $data['post_amp_content'] = str_replace( ']]>', '', $data['post_amp_content'] );
           return $data;
       } );
       ```
   
 *  Thread Starter [ulissse](https://wordpress.org/support/users/ulissse/)
 * (@ulissse)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10146451)
 * This is working great!
 * Thank’s a lot, i have all my problems solved.
 * Thanks again for you great work !
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10147829)
 * Thanks! By the way, there haven’t been a lot of plugin ratings submitted to coincide
   with the recent improvements to the plugin. If you wouldn’t mind adding a review
   that would be helpful: [https://wordpress.org/support/plugin/amp/reviews/#new-post](https://wordpress.org/support/plugin/amp/reviews/#new-post)
 *  Thread Starter [ulissse](https://wordpress.org/support/users/ulissse/)
 * (@ulissse)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10148674)
 * Done. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘<![CDATA[ tag block structured data’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [ulissse](https://wordpress.org/support/users/ulissse/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/cdata-tab-block-structured-data/#post-10148674)
 * Status: resolved