Forums | Mahara Community

Support /
Read external videos

19 June 2014, 2:28


I created a html file or I insert the embed code into a text box, the video does not start.
An example link

and code :

<div><object width="480" height="306" data="" type="application/x-shockwave-flash" class="playerpreview">
<param name="wmode" value="transparent"/>
<param value="" name="movie"/>
<param name="allowNetworking" value="all" />
<param name="allowScriptAccess" value="always" >
<param value="" name="movie"/>
<param value="true" name="allowFullScreen"/>
<param value="flv=" name="FlashVars"/></object>

It works with Wordpress but not with Mahara

Many thanks for your help



19 June 2014, 4:21

Bonjour Alain

L'explication est peut la suivante :

Mahara processes all HTML code through a script called HTML-purified which is here to prevent harmful code to be run.

I presume that <object> is trimmed away by HTML-purifier. You could avoid that by authorising an iframe source and then using <Iframe> Instead of <object>

You can also write a filter in php to change the rules used by HTML-purifier to clean the code.

Bon travail sur Mahara.

D Jan
Kristina Hoeppner's profile picture
Posts: 4043

22 June 2014, 13:29

Hello Alain,

HTML Purifier is not stripping out your entire code. Oftentimes, <embed> and <object> embed codes work fine as no special filter is needed. However, in the case of your <object> code, parts of it are stripped out because they could be causing a security problem. As dajan wrote, a filter or rule for HTML Purifier would be necessary to let these videos through.

Before you go through this, you could check with Neopodia if they also have an iframe option or are planning to have one.




3 results