Author: chris.laprun(a)jboss.com
Date: 2010-03-07 17:09:00 -0500 (Sun, 07 Mar 2010)
New Revision: 2024
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/InvocationHandler.java
Log:
- Use URLTools.safeEncodeForHTMLId.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/InvocationHandler.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/InvocationHandler.java 2010-03-07
17:47:40 UTC (rev 2023)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/InvocationHandler.java 2010-03-07
22:09:00 UTC (rev 2024)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.consumer;
+import org.gatein.common.net.URLTools;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.ErrorResponse;
@@ -147,14 +148,9 @@
protected String getNamespaceFrom(WindowContext windowContext)
{
- // todo: use URLTools.EncodeForHTMLId when it's available in common
if (windowContext != null)
{
- String id = windowContext.getId();
- id = id.replace('=', '_');
- id = id.replace('/', '_');
- id = id.replace('.', '_');
- return id.replace('+', '_');
+ return URLTools.safeEncodeForHTMLId(windowContext.getId());
}
return null;
Show replies by date