Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-viewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dmarcts-report-viewer-common.php')
-rw-r--r--dmarcts-report-viewer-common.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/dmarcts-report-viewer-common.php b/dmarcts-report-viewer-common.php
index 57811a1..6d5be4c 100644
--- a/dmarcts-report-viewer-common.php
+++ b/dmarcts-report-viewer-common.php
@@ -349,6 +349,15 @@ function format_date($date, $format) {
return $answer;
};
+// null-safe version of htmlspecialchars for PHP 8+ compatibility
+// --------------------------------------------------------------------------
+function html_escape($str) {
+ if ($str == null) {
+ return null;
+ }
+ return htmlspecialchars($str);
+}
+
// Get all configuration options
// --------------------------------------------------------------------------
function configure() {