[Bug]: (Match tab) If Search Title or Author contain &, search query is incorrectly encoded #1404

Closed
opened 2026-04-24 23:44:14 +02:00 by adam · 1 comment
Owner

Originally created by @mikiher on GitHub (Sep 20, 2023).

Describe the issue

In the match tab, when either Search Title or Author fields contain an ampersand character, the search query is incorrectly encoded, and an incorrect search url is sent to the server.

Steps to reproduce the issue

  1. Open Match tab for any book

  2. Set Search Title to "a&b" and Author to ""

  3. Click "Search"
    Expected search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a%26b
    Actual search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a&b

  4. Open Match tab for any book

  5. Set Search Title to "a" and Author to "b&c"

  6. Click "Search"
    Expected search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a&author=b%26c
    Actual search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a&author=b&c

Audiobookshelf version

v2.4.2

How are you running audiobookshelf?

Built from source

Originally created by @mikiher on GitHub (Sep 20, 2023). ### Describe the issue In the match tab, when either Search Title or Author fields contain an ampersand character, the search query is incorrectly encoded, and an incorrect search url is sent to the server. ### Steps to reproduce the issue 1. Open Match tab for any book 2. Set Search Title to "a&b" and Author to "" 3. Click "Search" Expected search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a%26b Actual search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a&b 1. Open Match tab for any book 2. Set Search Title to "a" and Author to "b&c" 3. Click "Search" Expected search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a&author=b%26c Actual search URL: http://localhost:3333/api/search/books?provider=audible&fallbackTitleOnly=1&title=a&author=b&c ### Audiobookshelf version v2.4.2 ### How are you running audiobookshelf? Built from source
adam added the bug label 2026-04-24 23:44:14 +02:00
adam closed this issue 2026-04-24 23:44:14 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 30, 2023):

Fixed in v2.4.4

@advplyr commented on GitHub (Sep 30, 2023): Fixed in [v2.4.4](https://github.com/advplyr/audiobookshelf/releases/tag/v2.4.4)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1404