开发者

YUICompressor unescapes backslashes

开发者 https://www.devze.com 2023-04-05 05:46 出处:网络
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

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';
0

精彩评论

暂无评论...
验证码 换一张
取 消