AI HELP · SEARCH LINKS 2026-10-14

AI made a search link for R&D. Did the query preserve the ampersand?

Build query names and values separately, then parse the finished query back. An ampersand inside a value can otherwise become a separator.

Node.js documents URLSearchParams for reading and writing URL query parameters. We checked a fictional search value locally, without opening a website or sending the value anywhere.

The short query that changed the meaning

Parsing q=R&D produced q with value R and another parameter D with an empty value. It did not retain R&D as the search term. A host can be correct while the query data is wrong.

Construct a value, not a pasted fragment

Our URLSearchParams object was given the pair q and R&D. It serialized to q=R%26D; parsing that result returned R&D intact. The encoded ampersand is part of the value. This is our local result, not proof of a particular website’s search behavior.

Ask AI for a round-trip check

Suggested input: “Construct the query from separate parameter names and values. Parse the final query and show that each value equals the original, including punctuation. Do not change the approved host or path.” Check the decoded value before sharing the link.

Encoding does not validate the destination

Use the receiving service’s actual parameter names and supported format. This test does not check redirects, ownership, authentication or server interpretation. Avoid putting private search terms into a public link merely because they have been encoded.

Published October 14, 2026. The fictional query was serialized and parsed with existing Node.js 24.19.0; the current reference page identifies version 26.11.1. No AI, external link, browser search or service request was tested.

Sources: Node.js · URLSearchParams.