The encodeURI() function computes a new version of the string value it is passed. The new version has certain characters replaced with hexadecimal escape sequences. The string is expected to conform to the UTF-8 profile.
All character codes other than letters, numbers or a small set of special characters will be escaped.
These special characters are not transformed:
Opening and closing parentheses
Note that the hash character is also not encoded by this function.