Sanitze in-admin view

This commit is contained in:
Jarek Rozanski 2022-12-17 20:56:55 +00:00
parent 04b8a858b7
commit f9597f16ae
2 changed files with 2 additions and 2 deletions

View file

@ -88,7 +88,7 @@ class WideAngleHelpers {
if($sanitizedValue != null) {
$asRegExp = "/" . wp_unslash($sanitizedValue) . "/";
if(@preg_match($asRegExp, null) === 0) {
$typedExclusion = "[" . $exclusionType . "]" . wp_unslash($sanitizedValue);
$typedExclusion = "[" . $exclusionType . "]" . filter_var($sanitizedValue, FILTER_SANITIZE_SPECIAL_CHARS);
array_push($exclusions, $typedExclusion);
} else {
$typedExclusion = "[" . $exclusionType . "]" . filter_var($sanitizedValue, FILTER_SANITIZE_SPECIAL_CHARS);

View file

@ -175,7 +175,7 @@ $generator = new WideAngleGenerator($this->settings[self::WAA_CONF_AT
</head>
<!-- .. -->
<b><?php echo esc_html($generator->generateFooterScript()); ?></b>
<b><?php echo esc_html(wp_unslash($generator->generateFooterScript())); ?></b>
</pre>
</code>
</div>