[PR #5723] [MERGED] fix: avoid double-encoding SearXNG search queries #5544

Closed
opened 2026-06-05 15:21:41 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5723
Author: @trick77
Created: 5/30/2026
Status: Merged
Merged: 6/1/2026
Merged by: @timothycarambat

Base: masterHead: fix-searxng-query-encoding


📝 Commits (3)

  • fc08337 fix: avoid double-encoding SearXNG search queries
  • 6e92c9b remove test
  • ffd0806 Merge branch 'master' into fix-searxng-query-encoding

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 server/utils/agents/aibitat/plugins/web-browsing.js (+1 -1)

📄 Description

Pull Request Type

  • fix (Bug fix)

Relevant Issues

resolves #5722

Description

SearXNG search queries were being passed through encodeURIComponent before being appended to URLSearchParams. Since URLSearchParams encodes values already, this produced double-encoded query strings like %2520.

This passes the raw query to URLSearchParams and adds a regression test for the SearXNG URL.

Visuals (if applicable)

N/A

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

Focused validation run:

npx --yes jest server/__tests__/utils/agents/aibitat/plugins/web-browsing.test.js --runInBand

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/5723 **Author:** [@trick77](https://github.com/trick77) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 6/1/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `fix-searxng-query-encoding` --- ### 📝 Commits (3) - [`fc08337`](https://github.com/Mintplex-Labs/anything-llm/commit/fc08337a6c991f389c3f3170bb626f2bbab2bd61) fix: avoid double-encoding SearXNG search queries - [`6e92c9b`](https://github.com/Mintplex-Labs/anything-llm/commit/6e92c9b93c6a1fe391827bc9dd1a763863c5e759) remove test - [`ffd0806`](https://github.com/Mintplex-Labs/anything-llm/commit/ffd0806b3f308ddec38c523fdda50a7e4592c616) Merge branch 'master' into fix-searxng-query-encoding ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/agents/aibitat/plugins/web-browsing.js` (+1 -1) </details> ### 📄 Description ### Pull Request Type - fix (Bug fix) ### Relevant Issues resolves #5722 ### Description SearXNG search queries were being passed through `encodeURIComponent` before being appended to `URLSearchParams`. Since `URLSearchParams` encodes values already, this produced double-encoded query strings like `%2520`. This passes the raw query to `URLSearchParams` and adds a regression test for the SearXNG URL. ### Visuals (if applicable) N/A ### Additional Information ### Developer Validations - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated (if applicable) - [x] I have tested my code functionality - [ ] Docker build succeeds locally Focused validation run: ```sh npx --yes jest server/__tests__/utils/agents/aibitat/plugins/web-browsing.test.js --runInBand ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 15:21:41 -04:00
yindo closed this issue 2026-06-05 15:21:41 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5544