In our application, we invoke YUICompressor to minify our javascript. Under some conditions we are having trouble identifying, it incorrectly unescapes backslash-escaped characters, so for example
var newline="\n"
becomes
var newline="
"
has anyone seen this before, and do you know why it happens and how to make it stop?
Oh yes - this i开发者_Python百科n the context of a Tapestry application, which may be related, since we can't reproduce the problem on the command line (using java -jar yuicompressor.jar...)
We now think this may be fixed by upgrading to a newer YUICompressor - version 2.6 I think
Did you try to use the inverted comma instead of the double quote?
var newline = '\n';
精彩评论