GitHubLeoYeh / granule

Automatically exported from code.google.com/p/granule
0 stars 0 forks source link

g:compress produces a <script> tag without <type> #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. g:compress produces a <script> tag without type="text/javascript"
2.
3.

What is the expected output? What do you see instead?

<script type="text/javascript" src="/combined.js?"

What version of the product are you using? On what operating system?

1.0.9

Please provide any additional information below.

Original issue reported on code.google.com by ragnar.r...@gmail.com on 27 Jun 2011 at 8:01

GoogleCodeExporter commented 8 years ago
This is actually fixable if you're willing to build from source:
in the com\granule\CompressTagHandler.java there's a piece of code saying:

String newText = "<script src=\"" + ...

change that to: 

String newText = "<script type=\"text/javascript\" src=\"" + ...

and you should be fine. (just rebuild using ant).

Original comment by martijn....@gmail.com on 28 Dec 2011 at 11:01

GoogleCodeExporter commented 8 years ago
I did. Its just that the default should be that type is included (otherwise its 
not valid html) 

Original comment by ragnar.r...@gmail.com on 28 Dec 2011 at 12:14

GoogleCodeExporter commented 8 years ago
I can confirm that the addition of the type attribute is necessary to get my 
jquerymobile app running.

Original comment by yglodt on 8 Jun 2012 at 12:00

GoogleCodeExporter commented 8 years ago
I confirm that the procedure given by martijn....@gmail.com works flawlessly.

Original comment by daria...@gmail.com on 6 Jul 2012 at 12:48