$allowed_elements = array('p', 'br', 'div', 'table', 'tr', 'td', 'th',
'ul', 'ol', 'li', 'blockquote', 'span', 'html', 'body', 'a', 'img',
- 'iframe', 'video', 'audio', 'source');
+ 'video', 'audio', 'source', 'object', 'embed');
+
+ if ($_SESSION['hasSandbox']) array_push($allowed_elements, 'iframe');
$disallowed_attributes = array('id', 'style', 'class');
loading_set_progress(20);
var hasAudio = !!((myAudioTag = document.createElement('audio')).canPlayType);
+ var hasSandbox = "sandbox" in document.createElement("iframe");
new Ajax.Request("backend.php", {
- parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio},
+ parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
+ hasSandbox: hasSandbox},
onComplete: function(transport) {
backend_sanity_check_callback(transport);
} });