CDATA after script tags
-
Hello!
I have custom shortcodes that create iframe embedded content. The plugin detects the iframe and wraps it in an op-social figure which is great, but I’ve noticed that a CDATA is being added after the script tag that is causing our javascript to not load correctly.This is the outcome:
<figure class=”op-social”><iframe><script><![CDATA[ // javascript content here ]]></script></iframe></figure>When I need:
<figure class=”op-social”><iframe><script>// javascript content here </script></iframe></figure>I can’t seem to figure out where to track down where the CDATA is being added nor can I figure out how create a rule to ignore script tags.
I’ve tried to add this rule to ignore script tags: { “rules” : [{ “class” : “PassThroughRule”, “selector” : “script” }] }
- The topic ‘CDATA after script tags’ is closed to new replies.