Skip to content

\u0026 is replaced by j in URL when adding nzb through API #540

@amaumene

Description

@amaumene

Is there already an issue for your problem?

  • I have checked older issues, open and closed

NZBGet Version

v24.9-testing

Platform

Linux/Docker

Environment

Package from GitHub running on OpenWrt aarch64. Tested with 24.3-24.9.

Current Behavior

When I add a nzb through the API I see that the first \u0026 (&) in the URL is replaced by a "j":

Wed Mar 26 02:39:35 2025	25703	548635196112	DEBUG	Request={"method":"append","params":[["obfuscated_nzb.nzb","https://obfuscated_website.com/api?t=get\u0026apikey=obfuscated_apikey\u0026id=obfuscated_id","obfuscated_category",0,false,false,"",0,"score",[["obfuscated_param","1110"]]]],"id":obfuscated_param_id} (WebServer.cpp:120:Execute)
Wed Mar 26 02:39:35 2025	25703	548635196112	INFO	Queue obfuscated_nzb @ obfuscated_website
Wed Mar 26 02:39:35 2025	25703	548634798800	DEBUG	getaddrinfo for obfuscated_website: 0 (Connection.cpp:604:DoConnect)
Wed Mar 26 02:39:35 2025	25703	548634798800	DETAIL	Downloading obfuscated_nzb @ obfuscated_website
"URL" : "https:\/\/obfuscated_website\/api?t=getjapikey=obfuscated_apikey&id=obfuscated_id",
"Text" : "obfuscated_nzb @ obfuscated_website"

As you can see it receives this url: https://obfuscated_website.com/api?t=get\u0026apikey=obfuscated_apikey\u0026id=obfuscated_id and it requests this one instead: https://obfuscated_website/api?t=getjapikey=obfuscated_apikey&id=obfuscated_id

Expected Behavior

The first \u0026 should be correctly interpreted as &.

Steps To Reproduce

No response

Logs

No response

Extra information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions