Author: dolander
Date: Mon Apr 11 09:43:21 2005
New Revision: 160923
URL: http://svn.apache.org/viewcvs?view=rev&rev=160923
Log:
Make entity encoding in a URL the default. The result is that for
both HTML and XHTML the '&' will be encoded as "&" inside of a URL.
There is a configuration in the beehive-netui-config file that will turn
the use the '&' character.
At the moment, the BVT/DRT webapp uses the '&' character instead of the default.
Modified:
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/core/urls/DefaultTemplatedURLFormatter.java
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/beehive-netui-config.xml
Modified:
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/core/urls/DefaultTemplatedURLFormatter.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/core/urls/DefaultTemplatedURLFormatter.java?view=diff&r1=160922&r2=160923
==============================================================================
---
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/core/urls/DefaultTemplatedURLFormatter.java
(original)
+++
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/core/urls/DefaultTemplatedURLFormatter.java
Mon Apr 11 09:43:21 2005
@@ -19,6 +19,8 @@
import org.apache.beehive.netui.core.urltemplates.URLTemplate;
import org.apache.beehive.netui.core.urltemplates.URLTemplateDescriptor;
+import org.apache.beehive.netui.util.config.bean.UrlConfig;
+import org.apache.beehive.netui.util.config.ConfigUtil;
import javax.servlet.ServletRequest;
@@ -52,7 +54,13 @@
}
else
{
- result = uri.getURIString();
+ UrlConfig urlConfig = ConfigUtil.getConfig().getUrlConfig();
+ if (urlConfig == null) {
+ result = uri.getURIStringForXML();
+ }
+ else {
+ result = (urlConfig.getHtmlAmpEntity()) ?
uri.getURIStringForXML() : uri.getURIString();
+ }
}
}
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/beehive-netui-config.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/beehive-netui-config.xml?view=diff&r1=160922&r2=160923
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/beehive-netui-config.xml
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/beehive-netui-config.xml
Mon Apr 11 09:43:21 2005
@@ -146,6 +146,10 @@
<id-javascript>legacy</id-javascript>
</jsp-tag-config>
+ <url-config>
+ <html-amp-entity>false</html-amp-entity>
+ </url-config>
+
<iterator-factories>
</iterator-factories>