summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/functions2.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/functions2.php b/include/functions2.php
index 29594076c..31ca98035 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -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',