1

I am trying to implement Video JS (http://www.videojs.com) in my EE site. When adding the required code snippet in my Wygwam field:

<video id="bhv_ontruiming" class="video-js vjs-default-skin" controls preload="auto" width="700" height="396" poster="https://intranet.abvakabofnv.nl/uploads/videos/bhv_ontruiming.png" data-setup="{'example_option':true}">
</video>

... and switching to source mode and back, Wygwam takes

data-setup='{"example_option":true}'

and forces the outer quotes to double quotes and the inner single quotes to &qout;

data-setup="{&quot;example_option&quot;:true}

... thereby disabling the functionality of the player.

Does anyone have any idea as to how to prevent this from happening?

Wygwam 3.1.1

1

Your first code snippet shows the double quotes on the outside, so Wygwam is not actually touching those at all. It's just converting the single quotes to entities.

I'm not able to reproduce that with the latest version of Wygwam, but you might try going into Add-Ons > Modules > Wygwam > [your config name], and adding the ‘entities’ advanced setting to “No”.

5
  • Thanks, Brandon. That helped a bit but it's still not working, so I figured I'd use the Allow_EE plugin and use {embed="inc/video" filename="bhv_ontruiming"} and {exp:allow_eecode embed="y"} in the template. That's cleaner and more flexible and easier for editors anyway. However, Wygwam now changes the {} characters: from {embed="inc/video" filename="bhv_ontruiming"} to &#123;embed="inc/video" filename="bhv_ontruiming"&#125; Is there an advanced setting that can override that? – Jolle Aug 15 '13 at 11:30
  • I've just added #123,#125 to 'entities_additional' and that's not doing anything either. It's worth noting that Wygwam doesn't alter the {} in the source mode, but they are made into &#123; and &#125; when viewed in the browser. Perhaps this is not a Wygwam issue? Not sure... – Jolle Aug 15 '13 at 11:49
  • Looking into the allow_ee plugin source, it seems the plugin should handle { and } as well as &#123; and &#125; So really, this is a mystery to me. – Jolle Aug 15 '13 at 12:10
  • Have you tried updating to the latest version of Wygwam? – Brandon Kelly Aug 15 '13 at 18:39
  • Yes, I've got Wygwam 3.1.1 installed. – Jolle Aug 15 '13 at 20:26
0

WYGWAM will strip that by default now. You'll need to alter the allowed content rules like this https://github.com/ckeditor/ckeditor-docs/tree/master/guides/dev/configuration/advanced_content_filter/allowed_content_rules

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.