Skip to content

Fix double URL-encoding of Spotify search queries - #105

Open
d1r0l wants to merge 1 commit into
Oceanity:mainfrom
d1r0l:double-URL-encoding-fix
Open

Fix double URL-encoding of Spotify search queries#105
d1r0l wants to merge 1 commit into
Oceanity:mainfrom
d1r0l:double-URL-encoding-fix

Conversation

@d1r0l

@d1r0l d1r0l commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • searchAsync was encoding the query twice — once manually via encodeURIComponent, once again via `URLSearchParams`'s own encoding — corrupting any query with non-ASCII or special characters before it reached Spotify's Search API.
  • Removes the redundant manual encoding; URLSearchParams already encodes its values correctly on its own.

Fixes #104

Test plan

  • npm test — all existing suites pass
  • npm run build — compiles clean
  • Manually verified in Firebot: searching a Cyrillic query that previously returned unrelated results now returns the correct match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Search queries are double URL-encoded, breaking search for non-ASCII / special-character queries

1 participant