Is it possible to prevent javascript in executing \n from string.
I have string which contains \n (i.e. "ksqOOEe+sqQwexx12lMf31V\nLqW23ds"). This is encrypted string and I have to handle it in Javascript. Problem is that JS break it into two rowns, than browser register Illegal operation. I don't want to escape it with other special characters because it is encrypted string and I have to use decryption process for data reconstruction in next steps.
\nunless you were eval() or otherwise executing the line - how is this string getting sent to JS?"or'characters, you'll have to escape it, or set the data-id separately so you're not passing the raw string through jquery's HTML parser.