Skip to content
Snippets Groups Projects
Commit c63850fa authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

if loaded over ssl and iframe is whitelisted, set its source to https

parent bd076268
No related branches found
No related tags found
No related merge requests found
......@@ -911,8 +911,13 @@
foreach ($entries as $entry) {
if (!iframe_whitelisted($entry)) {
$entry->setAttribute('sandbox', 'allow-scripts');
} else {
if ($_SERVER['HTTPS'] == "on") {
$entry->setAttribute("src",
str_replace("http://", "https://",
$entry->getAttribute("src")));
}
}
}
$allowed_elements = array('a', 'address', 'audio', 'article', 'aside',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment