- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 14 May 2010 15:22:42 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util In directory hutz:/tmp/cvs-serv10693/src/org/w3c/unicorn/util Modified Files: Templates.java Log Message: the compactor filter can now be deactivated based on USE_HTML_COMPACTOR property of unicorn configuration file Index: Templates.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Templates.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Templates.java 22 Oct 2009 14:25:20 -0000 1.3 +++ Templates.java 14 May 2010 15:22:40 -0000 1.4 @@ -15,8 +15,12 @@ public static void write(String templateName, VelocityContext context, Writer writer) { try { StringWriter sw = new StringWriter(); - Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, sw); - writer.append(Compactor.compactString(sw.toString(), templateName)); + if (Property.get("USE_HTML_COMPACTOR").equalsIgnoreCase("true")) { + Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, sw); + writer.append(Compactor.compactString(sw.toString(), templateName)); + } else { + Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, writer); + } } catch (ResourceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace();
Received on Friday, 14 May 2010 15:22:44 UTC