You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compress a large jsp page (e.g. 2MBytes) leads to messed up html code with
%%%COMPRESS~EVENT~1.000%%% to %%%COMPRESS~EVENT~11.687%%% fragments in the ouput
caused by HtmlCompressor:preserveBlocks
calls of java.text.MessageFormat.format("%%%COMPRESS~EVENT~{0}%%%", new
Object[] {Integer.valueOf(index)})
have to be MessageFormat.format("%%%COMPRESS~EVENT~{0,number,#}%%%", new
Object[] {Integer.valueOf(index)})
can be reproduced with this sample code
for(int index=995; index< 1005; index++){
// all COMPRESS~???~ patterns are wrong for i>=1000 (at least in HtmlCompressor.java)
String bad = java.text.MessageFormat.format("%%%COMPRESS~EVENT~{0}%%%" , new Object[] {Integer.valueOf(index)});
String good = java.text.MessageFormat.format("%%%COMPRESS~EVENT~{0,number,#}%%%", new Object[] {Integer.valueOf(index)});
System.out.println("bad: "+bad +", good:" +good);
}
with corrected code in HtmlCompressor, html output is good
Original issue reported on code.google.com by m.konic...@gmail.com on 2 Feb 2011 at 8:31
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
m.konic...@gmail.com
on 2 Feb 2011 at 8:31The text was updated successfully, but these errors were encountered: