I am attempting to use the escape function in order to construct a URL. However, it is not replacing plus + characters with hexadecimal sequences. What is the reason for this? In other languages, a plus is usually interpreted as a space. Why does escape ignore the plus character? Is this something I will need to treat as a special case and do the replacement myself?
The plus symbol is one of the character not encoded by the escape function:
Maybe try encodeURIComponent() instead: