LCHCAPITALHUMAIN / htmlcompressor

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

jQote templates break build script #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new html file
2. Paste in the markup at http://jsfiddle.net/aaronsnoswell/PyucS
3. Run htmlcompressor on the markup file

What is the expected output? What do you see instead?
htmlcompressor should skip over the <script type="text/x-jqote-template" 
id="template"></script> block as it isn't really javascript. Instead, 
htmlcompressor-1.4.3.jar will fail silently, reporting a success but the output 
file will be empty. htmlcompressor-1.5.2.jar throws an error. See the comment 
at https://github.com/h5bp/html5-boilerplate/issues/899#issuecomment-3272529 
for the error log.

What version of the product are you using? On what operating system?
Tested using htmlcompressor 1.4.3 and 1.5.2, on a Mac (Lion). Discovered this 
bug when using the html5 boilerplate with jQote templates (see the above github 
issue link).

Please provide any additional information below.
Feel free to contact me about the issue via github, email. I'm happy to 
contribute / help fix this (if I can!).

Original issue reported on code.google.com by aaron.sn...@gmail.com on 26 Dec 2011 at 7:35

GoogleCodeExporter commented 9 years ago
Edit: I've also tried it using the default JRE on Ubuntu Linux and can confirm 
it happens there too...

Original comment by aaron.sn...@gmail.com on 26 Dec 2011 at 7:36

GoogleCodeExporter commented 9 years ago
Same issue with the current 2.0 build and ICanHaz.  http://icanhazjs.com/ 

It uses the form: type="text/html which also shouldn't be treated as real 
javascript, but it is, throwing errors. 

Original comment by dtip...@gmail.com on 26 Jan 2012 at 12:02

GoogleCodeExporter commented 9 years ago
Thanks for the report, all I can suggest for now is wrapping script tags with 
<!--{{{--> <!--}}}--> skip comments.

Original comment by serg472@gmail.com on 26 Jan 2012 at 12:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Is there any way to handle this more gracefully? It's still coming up as an 
issue on the h5bp build script 
https://github.com/h5bp/ant-build-script/issues/30 and will likely continue to 
as more and more people use JS templating systems. 

Original comment by rob.re...@gmail.com on 4 Mar 2012 at 3:04

GoogleCodeExporter commented 9 years ago
Sorry for the long response, this should be fixed now in 1.5.3 release.

Original comment by serg472@gmail.com on 7 Mar 2012 at 1:33