diff --git a/includes/classes/admin/mapping/field-types/base.php b/includes/classes/admin/mapping/field-types/base.php
index 8c4ad3f..776cb54 100644
--- a/includes/classes/admin/mapping/field-types/base.php
+++ b/includes/classes/admin/mapping/field-types/base.php
@@ -65,17 +65,17 @@ public function e_type_id() {
}
public function option_underscore_template( View $view ) {
- $option = '';
+ $option = '';
if ( $types = $this->get_supported_types() ) {
$option = '<# if ( data.type in ' . $types . ' ) { #>' . $option . '<# } #>';
}
/**
- * This is not escaped as it can contain various tags that we know are safe.
+ * We force strip the script tags to avoid as XSS attacks.
+ * We are unable to use wp_kses as it doesn't handle the <# #> tags correctly and strips the end tag.
*/
- // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
- echo "\n\t" . $option;
+ echo "\n\t" . preg_replace("//s", "", $option)
}
public function underscore_options( $array ) {