macray / htmlcompressor

Automatically exported from code.google.com/p/htmlcompressor
Apache License 2.0
0 stars 0 forks source link

Pattern preservation within script tags #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a JSP tag between <script> tags
2. Turn on JSP preservation pattern and Javascript compression
3. Compile HTML with step 1 done to it

What is the expected output? What do you see instead?
I'm getting an error as follows:
Apr 14, 2011 12:21:13 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: :15: ERROR - Parse error. syntax error
        <%%%COMPRESS~USER0~0%%%>

What version of the product are you using? On what operating system?
version 1.2 on Windows Vista

Please provide any additional information below.
This looks like a thorny one. Closure Compiler doesn't like the placeholder but 
something will be necessary. Perhaps wrapping the placeholder in an alert that 
closure compiler will leave alone.

Original issue reported on code.google.com by erich.re...@gmail.com on 14 Apr 2011 at 4:29

GoogleCodeExporter commented 9 years ago
I don't think I can come up with a solution here. Wrapping temp placeholder 
with alert wouldn't help because jsp insert could be in such place that placing 
alert would cause js error as well.

I will think about it some more, but most likely this bug will remain 
unsolved...

That's why I listed jsp compression under bad practices :P 

Thanks.

Original comment by serg472@gmail.com on 14 Apr 2011 at 5:04

GoogleCodeExporter commented 9 years ago

Original comment by serg472@gmail.com on 25 Apr 2011 at 2:54