You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/06/20 02:01:04 UTC
svn commit: r548875 -
/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java
Author: ehillenius
Date: Tue Jun 19 17:01:04 2007
New Revision: 548875
URL: http://svn.apache.org/viewvc?view=rev&rev=548875
Log:
WICKET-674
Modified:
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java?view=diff&rev=548875&r1=548874&r2=548875
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java Tue Jun 19 17:01:04 2007
@@ -29,6 +29,7 @@
import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
import org.apache.wicket.util.resource.locator.IResourceStreamLocator;
import org.apache.wicket.util.resource.locator.ResourceStreamLocator;
+import org.apache.wicket.util.string.JavascriptStripper;
import org.apache.wicket.util.string.interpolator.MapVariableInterpolator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -204,7 +205,15 @@
*/
public String getString()
{
- return buffer.toString();
+ if (Application.get().getResourceSettings().getStripJavascriptCommentsAndWhitespace())
+ {
+ return JavascriptStripper.stripCommentsAndWhitespace(buffer.toString());
+ }
+ else
+ {
+ // don't strip the comments
+ return buffer.toString();
+ }
}
/**