I asked another question poorly so i’ll ask something else.
According to http://www.c-point.com/javascript_tutorial/special_characters.htm there are a few escape characters such as \n and \b. However / is not one of them. What happens in this case? (\/) is the \ ignored?
I have a string in javascript 'http:\/\/www.site.com\/user'. Not that this is a literal with ' so with " it would look like \\/ anyways i would like to escape this string thus the question on what happens on non ‘special’ escape characters.
And another question is if i had name:\t me (or "name:\\t me" is there a function to escape it so there is a tab? i am using C# and these strings come from a JSON file
According to Mozilla:
https://developer.mozilla.org/en/JavaScript/Guide/Values%2c_Variables%2c_and_Literals#section_19
The
\/sequence is not listed but there’re at least two common usages:<1> It’s required to escape literal slashes in regular expressions that use the
/foo/syntax:<2> It’s required to avoid invalid HTML when you embed JavaScript code inside HTML:
… triggers: end tag for element “P” which is not open
… doesn’t.