From 7d653eb480d3da5872de7200745bea87d033836f Mon Sep 17 00:00:00 2001 From: dengzhongyuan Date: Thu, 21 May 2026 11:00:58 +0800 Subject: [PATCH] fix(search): decode base64 keywords before updating search - Updated the search functionality to decode base64 encoded keywords before passing them to the search update method. This ensures proper handling of encoded search terms in the application. bug: https://pms.uniontech.com/bug-view-362267.html --- src/web/toManual/js/App.js | 8 ++++++-- src/web_dist/toManual/index.js | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/web/toManual/js/App.js b/src/web/toManual/js/App.js index 67bc86da8..e58c6285d 100755 --- a/src/web/toManual/js/App.js +++ b/src/web/toManual/js/App.js @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2022-2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -298,7 +298,11 @@ class App extends React.Component { } } else if (list[1] == 'search') { console.log("============>search...", list[2]); - global.qtObjects.search.updateSearch(list[2]); + let keyword = list[2]; + if (this.isbase64(keyword)) { + keyword = decodeURIComponent(atob(keyword)); + } + global.qtObjects.search.updateSearch(keyword); } else { global.bIsReload = true; this.context.router.history.go(0); diff --git a/src/web_dist/toManual/index.js b/src/web_dist/toManual/index.js index 82a8828f6..f3e2dd9ca 100644 --- a/src/web_dist/toManual/index.js +++ b/src/web_dist/toManual/index.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2022-2026 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;isearch...", list[2]); - global.qtObjects.search.updateSearch(list[2]); + var keyword = list[2]; + if (_this4.isbase64(keyword)) { + keyword = decodeURIComponent(atob(keyword)); + } + global.qtObjects.search.updateSearch(keyword); } else { global.bIsReload = true; this.context.router.history.go(0);