Skip to content

Commit

Permalink
Update buildInFilters.inc.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatthes authored Jun 19, 2023
1 parent df26886 commit e538f87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/buildInFilters.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
TextTemplate::$__DEFAULT_FILTER["_DEFAULT_"] = function ($input) {
if ($input === null)
return "null";
if (is_array($input))
return "##ERR:filter:html - input is array##";
return htmlspecialchars($input);
};

// Raw is only a pseudo-filter. If it is not in the chain of filters, __DEFAULT__ will be appended to the filter
TextTemplate::$__DEFAULT_FILTER["html"] = function ($input) {
if ($input === null)
return "null";
if (is_array($input))
return "##ERR:filter:html - input is array##";
return htmlspecialchars($input);
};
TextTemplate::$__DEFAULT_FILTER["raw"] = function ($input) { return $input; };
Expand Down Expand Up @@ -54,4 +58,4 @@
if (is_array($input))
return count ($input);
return 0;
};
};

0 comments on commit e538f87

Please sign in to comment.