Correct encoding of query string values in URLs