[Building Sakai] AntiSamy is breaking Kaltura

Kusnetz, Jeremy JKusnetz at APUS.EDU
Thu Jul 25 09:01:30 PDT 2013


FYI, I found it's the space between the " and /> that is causing the kaltura-display javascript to fail.  If I turn AntiSamy off I can edit the html that kaltura injected and AntiSamy modified and remove that space.  Once the space has been removed the video loads as expected.  So maybe AntiSamy isn't  really the issue here but the kaltura javascript?  But that said, AntiSamy does change up the html which can cause some weird issues like this.

From: sakai-dev-bounces at collab.sakaiproject.org [mailto:sakai-dev-bounces at collab.sakaiproject.org] On Behalf Of Kusnetz, Jeremy
Sent: Thursday, July 25, 2013 11:20 AM
To: sakai-dev
Subject: [Building Sakai] AntiSamy is breaking Kaltura

When creating a video with Kaltura with AntiSamy turned on (Low or High setting), it's breaking the kaltura-display.js javascript which replaces the thumbnail with the actual video.

Timestamp: 7/25/13 11:13:19 AM
Error: TypeError: $ is not a function
Source File: https://devsakai18/kaltura/javascript/kaltura-display.js
Line: 39

Here is line 39:
            $("<span>" + child.textContent + "</span>").insertBefore($(this));

Here is a diff between an announcement with a kaltura video made with the legacy scanner compared to the exact same video in an announcement made with AntiSamy turned on.

-              <p><p>
-              <span class="kaltura-media" rel="1_0h213dhr::video"><img src="https://cdnsecakmi.kaltura.com/p/1147982/sp/114798200/thumbnail/entry_id/1_0h213dhr/version/100000"/></span></p></p>
+             <p><p>  <span class="kaltura-media" rel="1_0h213dhr::video">
+    <img src="https://cdnsecakmi.kaltura.com/p/1147982/sp/114798200/thumbnail/entry_id/1_0h213dhr/version/100000" /></span></p></p>

The only real differences I can see is there is a space between 100000" and the /> and it's putting the span on the same line as the <p><p> tags but putting the img on a new line.

Not sure if the fix needs to be in the kaltura javascript or if something needs to change with AntiSamy.

This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130725/d38580c1/attachment.html 


More information about the sakai-dev mailing list