RefineryCMS / Wymeditor whitelisting fails

482 views Asked by At

I am trying to use RefineryCMS + refinerycms-videojs and the WYMeditor keeps stripping of f wrong tags..

So when I insert the video for example and press "Save", I get this:

<video id="video_1" class="video-js vjs-default-skin" width="400" height="300" data-setup=" {&quot;autoplay&quot;: false,&quot;controls&quot;: true,&quot;preload&quot;: true,&quot;loop&quot;: true}"><source src="/system/videos/W1siZiIsIjIwMTMvMDUvMjkvMTJfMTlfMTRfNjMyX0JlYXN0aWUubXA0Il1d/Beastie.mp4" type="video/mp4"></source>

Here the closing /video tag is stripped.

The whitelists that refinerycms-videojs adds are these:

config.wymeditor_whitelist_tags = {'video' => {'attributes' => {'1' => 'poster', '2' => 'width', '3' => 'height', '4' => 'source', '5' => 'controls'} },
                                 'source' => {'attributes' => {'1' => 'src', '2' => 'type'}}}

Here is the example of what javascript generated by this code looks like, surprisingly the .js file that I get in my browser is not really different (in that part)..

I guess something is missing, but what..?

0

There are 0 answers