Author: wesw
Date: Tue Mar 24 14:53:29 2009
New Revision: 757826
URL: http://svn.apache.org/viewvc?rev=757826&view=rev
Log:
WW-3045 fixing compile errors from removing TextUtils
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Anchor.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Anchor.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Anchor.java?rev=757826&r1=757825&r2=757826&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Anchor.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Anchor.java
Tue Mar 24 14:53:29 2009
@@ -22,7 +22,6 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java?rev=757826&r1=757825&r2=757826&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
Tue Mar 24 14:53:29 2009
@@ -24,11 +24,12 @@
import java.io.IOException;
import java.io.Writer;
+import org.apache.commons.lang.StringEscapeUtils;
+
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.StrutsConstants;
-import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
@@ -156,10 +157,10 @@
private String prepare(String value) {
String result = value;
if (escape) {
- result = TextUtils.htmlEncode(result);
+ result = StringEscapeUtils.escapeHtml(result);
}
if (escapeJavaScript) {
- result = TextUtils.escapeJavaScript(result);
+ result = StringEscapeUtils.escapeJavaScript(result);
}
return result;
}
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java?rev=757826&r1=757825&r2=757826&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
Tue Mar 24 14:53:29 2009
@@ -27,7 +27,6 @@
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
-import com.opensymphony.xwork2.util.TextUtils;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java?rev=757826&r1=757825&r2=757826&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Text.java
Tue Mar 24 14:53:29 2009
@@ -32,7 +32,6 @@
import org.apache.struts2.util.TextProviderHelper;
import org.apache.commons.lang.xwork.StringUtils;
-import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java?rev=757826&r1=757825&r2=757826&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsUtil.java
Tue Mar 24 14:53:29 2009
@@ -40,13 +40,14 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
+import org.apache.commons.lang.StringEscapeUtils;
+
import org.apache.struts2.views.jsp.ui.OgnlTool;
import org.apache.struts2.views.util.UrlHelper;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
@@ -228,7 +229,7 @@
return null;
}
- return TextUtils.htmlEncode(obj.toString());
+ return StringEscapeUtils.escapeHtml(obj.toString());
}
public int toInt(long aLong) {