Title: oEmbed script tags
Last modified: August 24, 2018

---

# oEmbed script tags

 *  [ssimo3](https://wordpress.org/support/users/ssimo3/)
 * (@ssimo3)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/oembed-script-tags/)
 * As of version 4.4, WordPress has become an oEmbed provider. I am trying to embed
   a WordPress post in the page in the “Link to the page you need help with” field.
   Do not be confused; the page in the “Link to the page you need help with” field
   is NOT a WordPress page. But I have a WordPress site that obeys the same-origin
   policy. I am using the “HTML Embed” feature of the new Gutenberg editor to get
   the code needed to embed WordPress content on a non-WordPress site.
 * My issue is that I need to refactor the oEmbed code slightly. My main site uses
   an in-house Content Management System (CMS) to display the content, and that 
   CMS uses CKEditor as its text editor. CKEditor filters out any and all content
   between `<script></script>` tags. I need to put the JavaScript in an external
   script and call it with the “src” attribute. The problem is that there is a CDATA
   section within the script. The actual block that the script executes is wrapped
   in the CDATA section.
 * I have a hunch that I may be able to externalize the script. For one thing, I
   believe that the script content is constant no matter what post is being embedded.
   For another, I don’t think it’s really necessary to have the CDATA wrapper. I’m
   asking the WordPress developers if this will work.
    -  This topic was modified 7 years, 9 months ago by [ssimo3](https://wordpress.org/support/users/ssimo3/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Foembed-script-tags%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * (@jaycbrf)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/oembed-script-tags/#post-10621310)
 * Since your issue is not about WordPress support, I suggest either posting in 
   the “Developing With” forum of on WordPress.stackexchange.com
    If the script 
   contains CDATA, then it is very necessary.
 * Have you thought of creating a custom page template and embedding the script 
   in the template?
 *  Thread Starter [ssimo3](https://wordpress.org/support/users/ssimo3/)
 * (@ssimo3)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/oembed-script-tags/#post-10621929)
 * I’m actually working on it. I’ve discovered what I think is a new bug in the 
   process, though: I have added `<base target="_blank" />` to my WordPress theme’s`
   header-embed.php`, but I cannot get WordPress to obey it. If I embed non-WordPress
   content into an iframe that has `<base target="_blank"/>`, it works just fine;
   it is broken only on WordPress as an oEmbed provider.
 * And yes, before you ask, I have tried removing the `sandbox` attribute.
    -  This reply was modified 7 years, 9 months ago by [ssimo3](https://wordpress.org/support/users/ssimo3/).

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

The topic ‘oEmbed script tags’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [ssimo3](https://wordpress.org/support/users/ssimo3/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/oembed-script-tags/#post-10621929)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
