colon is a character that can be encoded to "% 3A" across many sites and when I try to encode with URIencode it doesn't work
URIencode
for example if I try to code like URIencode(':'); then nothing happens. the colon is returned. Why is this?? can someone help me here.
URIencode(':');
Thanks in advance.
encodeURI() encodes special characters except:
encodeURI()
, / ? : @ & = + $ #
You should use this instead encodeURIComponent(':');
encodeURIComponent(':');
This function encodes special characters. Also, it encodes characters missingencodeURI()