Skip to content
Browse files

issue: Check $cfg iFrame

This addresses an issue where we don’t check if $cfg exists before using it.
This adds a check for `$cfg` before we use it to avoid fatal errors.
  • Loading branch information...
JediKev committed Nov 6, 2019
1 parent 086135c commit a6b820039bb6876ef7925251c2f121508755d649
Showing with 2 additions and 1 deletion.
  1. +2 −1 include/class.format.php
@@ -330,7 +330,8 @@ function safe_html($html, $options=array()) {
// iFrame Whitelist
$whitelist = $cfg->getIframeWhitelist();
if ($cfg)
$whitelist = $cfg->getIframeWhitelist();
if (!empty($whitelist)) {
$config['elements'] = '*+iframe';
$config['spec'] = 'iframe=-*,height,width,type,style,src(match="`^(https?:)?//(www\.)?('

0 comments on commit a6b8200

Please sign in to comment.
You can’t perform that action at this time.