|
|
@ -532,7 +532,9 @@ abstract class AbstractSanitizer { |
|
|
|
} |
|
|
|
// finally handle the boolean options |
|
|
|
foreach (["allowCustomElements", "allowUnknownMarkup", "allowComments", "allowProcessingInstructions", "nullNamespaceAsHtml"] as $opt) { |
|
|
|
$out[$opt] = (bool) $config[$opt] ?? self::DEFAULT_CONF[$opt]; |
|
|
|
if (isset($config[$opt])) { |
|
|
|
$out[$opt] = (bool) $config[$opt]; |
|
|
|
} |
|
|
|
} |
|
|
|
// use the normalized configuration |
|
|
|
$this->config = $out; |
|
|
@ -600,7 +602,9 @@ abstract class AbstractSanitizer { |
|
|
|
} |
|
|
|
// finally handle the boolean options |
|
|
|
foreach (["allowCustomElements", "allowUnknownMarkup", "allowComments", "allowProcessingInstructions", "nullNamespaceAsHtml"] as $opt) { |
|
|
|
$out[$opt] = $config[$opt]; |
|
|
|
if (isset($config[$opt])) { |
|
|
|
$out[$opt] = $config[$opt]; |
|
|
|
} |
|
|
|
} |
|
|
|
// return the transformed configuration |
|
|
|
return $out; |
|
|
|