I have an array filled with strings, a value can for example be “not updated for > days”. I use the values in the array to create some url’s and need to remove the /\<> and other illegal URL characters. How do I easiest do this?
I started with
var Name0 = title[0].substring(1).replace(" ", "%20").replace("/", "") + '.aspx';
var Name1 = title[1].substring(1).replace(" ", "%20").replace("/", "") + '.aspx';
and so on but can I do this in a better way?
Thanks in advance.
If you wish to keep the symbols in the URI, but encode them:
If you wish to build ‘friendly’ URIs such as those on blogs: