dejs icon indicating copy to clipboard operation
dejs copied to clipboard

Using \n in script tag will result in actual line break sent to client

Open danbulant opened this issue 4 years ago • 1 comments

Hi.

I have overall positive experience with dejs, but found a rather interesting bug: when you use \n, it will result in line break being sent to the client (which can break scripts). I found this when trying to use newline in console log and it resulted in script having invalid syntax (as double quote strings cannot be multiline).

This can be fixed by escaping it again, but I think it shouldn't be needed to do only to support ejs.

danbulant avatar Jul 08 '20 19:07 danbulant

@danbulant I'll check this later, thanks!

syumai avatar Jul 09 '20 00:07 syumai