PLUTO-619 Fix parsing of escapeXml container runtime option
git-svn-id: https://svn.apache.org/repos/asf/portals/pluto/trunk@1377087 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java b/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
index 51eb216..d58598e 100644
--- a/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
+++ b/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
@@ -55,10 +55,7 @@
String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
if (result != null){
if (result.length > 0){
- if (result[0].equals(true))
- escapeXml = true;
- else if (result[0].equals(false))
- escapeXml = false;
+ escapeXml = Boolean.parseBoolean(result[0]);
}
}
}
diff --git a/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java b/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
index 4999f42..215b8e4 100644
--- a/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
+++ b/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
@@ -57,22 +57,19 @@
* @see org.apache.pluto.tags.BaseURLTag#doStartTag()
*/
@Override
- public int doStartTag() throws JspException {
- PortletConfig portletConfig =
- (PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
-
- Map<String,String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
- if (containerRuntimeOptions != null){
- String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
- if (result != null){
- if (result.length > 0){
- if (result[0].equals(true))
- escapeXml = true;
- else if (result[0].equals(false))
- escapeXml = false;
- }
- }
- }
+ public int doStartTag() throws JspException {
+
+ PortletConfig portletConfig =
+ (PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
+ Map<String,String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
+ if (containerRuntimeOptions != null){
+ String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
+ if (result != null){
+ if (result.length > 0){
+ escapeXml = Boolean.parseBoolean(result[0]);
+ }
+ }
+ }
PortletResponse portletResponse = (PortletResponse) pageContext.getRequest()
.getAttribute(Constants.PORTLET_RESPONSE);