-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to embed a youtube video. Both New and Old code to embed a youtube video are deleted on Saving A Page #1221
Comments
Thanks @cypherinfo. Some info on how to replicate this:-
Expected Result: Youtube video gets embedded on the report/page added |
Which embed code are you using? are you using youtube short urls? There are a couple of ways this should work:
I don't think |
Hello,
|
I was using the iframe embed codes. Didn't work. |
Hello there, I just wanted to bump this as I think that the ability to embed videos — particularly tutorial screencasts — directly within pages would be very useful. If it's possible/practical to raise this to a P2 priority level, I would appreciate that; alternatively, if someone can point me to the relevant file(s)/functions, I'd be happy to look into this myself. Cheers, |
Confirming behaviour:
Having a look on what we can do. |
I had a look and we need a wee change on the code make this work (requested on #1244). I've also put a pull request on (#1245) to update the The only way to get this working for pages is use the HtmlPurifier class as the xss filtering tool. To enable that on live deployments you'll need to make the updates below together with the updates on #1244. /application/config/config.php // Line 73 - Using htmlpurifier as default xss filter
$config['global_xss_filtering'] = "htmlpurifier";
// Line 177: #1245 updates the config template, this needs to be changed on live config
$config['safe_iframe_regexp'] = '%^//(www.youtube.com/embed/|player.vimeo.com/video/|w.soundcloud.com/player!)%'; This should fix the embed issue for pages. I would like to reiterate that this touches on a couple of things that I don't have fully understanding off just yet and there might be unwanted consequences here. Keen to have @rjmackay review this before assuming it is a good fix. :) |
Allowing iframe embeds in report description is a desired behaviour.. but fixing the I'm not sure on the global XSS clean fix.. I though Iframes made it through that anyway.. its only ever there as an extra layer, its actually quite easy to get around.. |
To allow for reports to have embed on the description we need to get the |
Enabling Safe Iframe for Input class #1221
Hello, when I save a page of my Crowdmap deployment with the code (new way: with the iframe and old way: with flash) to embed a youtube video (that happens on my localhost Ushahidi installation) the same is deleted! I mean when I go the that page no video is embedded and when I try to edit it the code is disappeared!
When I try to preview it before the saving it seems to display it well!
Thank you.
The text was updated successfully, but these errors were encountered: