Embedding an external video in a Community Server blog post
Yesterday was a busy day for me—I first was working on troubleshooting my IIS7 authentication issue and then had an interesting technical support question get passed on to me.
The customer was trying to embed a video from CBS.com inside of a blog on their website. As you might know, Community Server handles YouTube video embedding very nicely through a custom dialog box, and CS also supports uploading videos directly to your site and embedding them there. If you want to embed a video from another location though, you need to copy the embed code for that video and paste it directly into the HTML of your blog post.
Or so you think. People try to do this, but they notice that for some reason, whatever they paste in the HTML editor seems to get “scrubbed” back out. Because it is. For (very good) security reasons, the HTML scrubber in Community Server scrubs out OBJECT and EMBED tags and their attributes by default.
This can be modified by adding these tags as “allowed” in your CommunityServer.config file. There are better places to learn about this, but there’s an even easier way…an override file for CommunityServer.config.
I created an override file that you simply need to place inside of your Community Server installation’s root directory. Restart the site in IIS, and you should be ready to embed external videos on your site.
Download the file here (you’ll need to rename the extension from “add_config” to just “config”):
Download CommunityServer_override.config
Please note—allowing these tags on a large, public community site is not recommended. They are potential security holes, and the override I’m providing above is only a workaround meant for people who are using Community Server for smaller, personal blogging sites.
Let me know how it works for you!
Similar Posts
- What do you use online community for?
- Solving "Critical Error: SiteURLs.config" issue on Community Server with IIS 7
- Salsa for Fun and Profit
