Extension for New Embed Type Doesn't Show correctly in Lists widgets

I implemented a new Embed type to use in the TinyMCE editor to support our Communications group who wanted to assign a specific image as the Poster image for their videos. This was based on the conversation in this thread. https://community.telligent.com/community/10/f/ask-the-community/1145485/htmlsanitation-in-10-1. The extension works just as planned. It allows them to enter a URL to their video, a URL to their poster image and the size they want their video displayed. The output of the extension is the standard HTML5 <video> code using their poster image.

The one issue I have noted is that this embed extension is not displayed correctly when the item is displayed in the Activity Story Stream or the Blog - Post List widgets. The <video> and <source> tags have been scrubbed from the output, leaving only the alternative text that was inside the <video> tag for browsers that do not support HTML5 <video> tags. 

I also created what is essentially an identical extension for embedding <audio> into the TinyMCE. Same thing here. It displays fine in the post itself, but only shows the alternative text with the <audio> and <source> tags scrubbed from the output when it shows up in the Activity Story Stream or Blog - Post List widgets. 

Is there something I missed in the implementation? Or there something that needs to be done in those widgets? Or ...

Parents Reply
  • if the video was dropped due to truncation that content should have been removed as well, since it is contained. 

    With your legacy video content where the raw HTML is part of the post content, the truncation process will remove the video element during HTML sanitization. When we truncate HTML content and preserve HTML, we process the truncated result through our HTML sanitization logic to ensure that the resulting truncated HTML is still valid HTML. In that process, the video tag will be removed because it is not allowed by our HTML sanitizer, but we've also configured the sanitizer to not remove child content for video/audio elements (since that inner content is the fallback for browsers not supporting audio/video).