Encoding key or value parts of query component because encodeURIComponent is too aggressive
npm install encode-uri-query
Extracted copy of anuglar's internal encodeUriQuery() function so that we can create matching urls.
encodeUriQuery()