-
From e31586a6ae1db8db370c5cd3d82e153facaa1576 Mon Sep 17 00:00:00 2001
From: shewa <30765517+shewa12@users.noreply.github.com>
Date: Tue, 25 Aug 2026 12:15:22 +0600
Subject: [PATCH 2/7] Fix: XSS issue on the SearchFilter component
---
components/SearchFilter.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/components/SearchFilter.php b/components/SearchFilter.php
index b8c660a2f4..dd68dc53e7 100644
--- a/components/SearchFilter.php
+++ b/components/SearchFilter.php
@@ -240,7 +240,7 @@ public function get(): string {
$clear_action = 'GET' === strtoupper( $method )
? 'window.location.href = ' . wp_json_encode( $clear_url )
- : "setValue('" . esc_js( $input_name ) . "', ''); \$el.closest('form').submit();";
+ : 'setValue(' . wp_json_encode( (string) $input_name ) . ', \'\'); $el.closest(\'form\').submit();';
$this->attributes = array_merge(
array(
@@ -279,8 +279,8 @@ public function get(): string {
name=""
placeholder=""
class="tutor-input tutor-input-content-left tutor-input-content-clear"
- x-bind="register('')"
- x-init="$nextTick(() => setValue('', ''))"
+ x-bind="register()"
+ x-init="$nextTick(() => setValue(, ))"
/>