Tuesday, August 20, 2013

SharePoint 2013 IFrame: This HTML cannot be inserted because this type of content is not allowed.

Hi All,

We got below error when trying to embed a IFrame in SharePoint 2013 Page (Edit Page > Embed Code)

IFrame code:

<iframe src="http://www.w3schools.com" width="600" height="400"></iframe>

and the error:


Go to Site Settings > Site Collection Administration > HTML Field Security

In "Allow iframes from this domain" section, add http://www.w3schools.com  and click OK as shown below:

Once this is done, the site is displayed properly in IFrame as shown below:

Hope this helps someone out there :)