cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r124295 - /cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java /cocoon/trunk/status.xml
Date Wed, 05 Jan 2005 23:00:33 GMT
Author: rgoers
Date: Wed Jan  5 15:00:30 2005
New Revision: 124295

URL: http://svn.apache.org/viewcvs?view=rev&rev=124295
Log:
fix for bug 32838 - encode pagelabel url.

Modified:
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java
   cocoon/trunk/status.xml

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java?view=diff&rev=124295&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java&r1=124294&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java&r2=124295
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java
Wed Jan  5 15:00:30 2005
@@ -88,8 +88,16 @@
                     else {
                         buffer.append('?');
                     }
-                    buffer.append(requestParameterName).append('=')
-                        .append(SourceUtil.encode(key.toString()));
+                    String encodedKey;
+                    try
+                    {
+                        encodedKey = SourceUtil.encode(key.toString(), "utf-8");
+                    }
+                    catch (Exception ex)
+                    {
+                        encodedKey = SourceUtil.encode(key.toString());
+                    }
+                    buffer.append(requestParameterName).append('=').append(encodedKey);
                     return buffer.toString();
                 }
             }
@@ -112,7 +120,7 @@
             return this.getRefreshLinkURI();
         }
         if (this.labelManager == null) {
-            super.getLinkURI(events);
+            return super.getLinkURI(events);
         }
 
         String requestParameterName = this.labelManager.getRequestParameterName();
@@ -224,7 +232,16 @@
         } else {
             uri.append('?');
         }
-        uri.append(parmName).append('=').append(SourceUtil.encode(label));
+        String encodedLabel;
+        try
+        {
+            encodedLabel = SourceUtil.encode(label.toString(), "utf-8");
+        }
+        catch (Exception e)
+        {
+            encodedLabel = SourceUtil.encode(label.toString());
+        }
+        uri.append(parmName).append('=').append(encodedLabel);
         return uri.toString();
     }
 }

Modified: cocoon/trunk/status.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?view=diff&rev=124295&p1=cocoon/trunk/status.xml&r1=124294&p2=cocoon/trunk/status.xml&r2=124295
==============================================================================
--- cocoon/trunk/status.xml	(original)
+++ cocoon/trunk/status.xml	Wed Jan  5 15:00:30 2005
@@ -457,6 +457,9 @@
    </action>
  </release>
  <release version="2.1.7" date="TBD">
+   <action dev="RG" type="fix" fixes-bug="32838" due-to="Roy Huang" due-to-email="lingererhuang@hotmail.com">
+     PageLabel url's were not properly encoded.
+   </action>
    <action dev="AG" type="update">
      Updated quartz to 1.4.3, nekodtd to 0.1.11, nekohtml to 0.9.4
      castor to 0.9.5.4, commons-digester to 1.6, groovy to 1.0-beta-8, asm to 1.5.2

Mime
View raw message