mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-29 22:37:34 +00:00
Clients that encode nostrconnect:// and NIP-55 URIs with URLSearchParams or URLEncoder.encode send spaces as '+', so the connect card and the saved application showed names like "My+App". Desktop already decoded each query value with URLDecoder; Android kept the '+' because the whole query was decoded in one pass with the plus-preserving decodeData(replace=true) that payloads need. Query parsing now splits the raw query first and form-decodes each value exactly once (decodeQueryParamValue in :common, shared by the Android bunker and NIP-55 parsers and the desktop BunkerEngine): '+' becomes a space, a literal '+' arrives as '%2B' and survives, and a stray '%' keeps the raw value. Splitting before decoding also stops an encoded '&' (%26) inside a value from splitting the param in two. Signing payloads keep the plus-preserving decode, so encrypted payloads are unaffected.