They need to be percent-encoded:
> encodeURIComponent('&')
"%26"
So in your case, the URL would look like:
http://www.mysite.com?candy_name=M%26M
More Related Contents:
- Semicolon as URL query separator
- What is the maximum length of a URL in different browsers?
- What is the difference between a URI, a URL and a URN?
- What is the difference between POST and GET? [duplicate]
- Can I change all my http:// links to just //?
- Correct way to pass multiple values for same parameter name in GET request
- Can I use an at symbol (@) inside URLs?
- URL matrix parameters vs. query parameters
- Spaces in URLs? [duplicate]
- Is there any downside for using a leading double slash to inherit the protocol in a URL? i.e. src=”//domain.com”
- Do I need a content-type header for HTTP GET requests?
- URL: Username with @
- Encrypt IDs in URL variables
- What is the limit on QueryString / GET / URL parameters
- What is the difference between URI, URL and URN? [duplicate]
- Why shouldn’t data be modified on an HTTP GET request?
- URL without “http|https”
- Is a slash (“/”) equivalent to an encoded slash (“%2F”) in the path portion of an HTTP URL
- What characters must be escaped in an HTTP query string?
- URL hash is persisting between redirects
- Why is the GET method faster than POST in HTTP?
- Add subdomain to localhost URL
- How do you add query parameters to a Dart http request?
- What is a safe maximum length a segment in a URL path should be?
- HTTP GET Request, ASP – I’m lost!
- Is a URL with // in the path-section valid?
- What is Cache-Control: private?
- Custom HTTP Authorization Header
- How to get data out of a Node.js http get request
- Multiple HTTP Authorization headers?