mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-3045 fixing compile errors from removing TextUtils
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@757826 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -24,11 +24,12 @@ package org.apache.struts2.components;
|
||||
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 @@ public class Property extends Component {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.opensymphony.xwork2.config.entities.ActionConfig;
|
||||
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;
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||
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;
|
||||
|
||||
@@ -40,13 +40,14 @@ import javax.servlet.http.HttpServletRequest;
|
||||
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 @@ public class StrutsUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
return TextUtils.htmlEncode(obj.toString());
|
||||
return StringEscapeUtils.escapeHtml(obj.toString());
|
||||
}
|
||||
|
||||
public int toInt(long aLong) {
|
||||
|
||||
Reference in New Issue
Block a user