,encodeURIComponent does not encode the single quote (apostrophe) because
according to RFC 3986
the apostrophe does not need to be encoded in any part of the URL. (It is a ‘reserved’ character
but carries no special meaning in this context.)
according to RFC 3986
but carries no special meaning in this context.)