You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/10/13 19:03:00 UTC

svn commit: r320807 - in /incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags: BigWeblogCalendarModel.java WeblogCalendarModel.java

Author: snoopdave
Date: Thu Oct 13 10:02:58 2005
New Revision: 320807

URL: http://svn.apache.org/viewcvs?rev=320807&view=rev
Log:
Resolves ROL-811: unnecessary JSESSIONIDs

Modified:
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java?rev=320807&r1=320806&r2=320807&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java Thu Oct 13 10:02:58 2005
@@ -82,7 +82,7 @@
         {
             if ( day == null )
             {
-                url = mRes.encodeURL(mSelfUrl + mCatName);
+                url = mSelfUrl + mCatName;
             }
             else 
             {
@@ -98,17 +98,17 @@
                         mStarDateFormat.format(entry.getPubTime());
                     
                     // append 8 char date string on end of selfurl
-                    url = mRes.encodeURL(mSelfUrl+"/"+dateString+mCatName);
+                    url = mSelfUrl+"/"+dateString+mCatName;
                 }
                 else if ( entries != null )
                 {
-                    url = mRes.encodeURL(mSelfUrl+"/"+mCatName);
+                    url = mSelfUrl+"/"+mCatName;
                 }
                 else if ( valid ) 
                 {
                     // Make the date yyyyMMdd and append it to URL
                     dateString = mStarDateFormat.format( day );
-                    url = mRes.encodeURL(mSelfUrl+"/"+dateString+mCatName);
+                    url = mSelfUrl+"/"+dateString+mCatName;
                 }
             }
         }
@@ -143,7 +143,7 @@
                     ((WeblogEntryData)entries.get(0)).getPubTime());
                                 
                 // append 8 char date string on end of selfurl
-                String dayUrl = mRes.encodeURL(mSelfUrl+"/"+ dateString+mCatName );
+                String dayUrl = mSelfUrl+"/"+ dateString+mCatName;
 
                 sb.append("<div class=\"hCalendarDayTitleBig\">");
                 sb.append("<a href=\"");

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java?rev=320807&r1=320806&r2=320807&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java Thu Oct 13 10:02:58 2005
@@ -1,6 +1,7 @@
 
 package org.roller.presentation.weblog.tags;
 
+import java.net.URLEncoder;
 import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
@@ -58,7 +59,15 @@
         }
         if ( catToUse != null )
         {
-            mCatName = "?"+catKey+"="+catToUse;
+            try 
+            {
+                mCatName = "?"+catKey+"="+URLEncoder.encode(catToUse, "UTF-8");
+            }
+            catch (Throwable shouldNeverHappen)
+            {
+                mLogger.error(shouldNeverHappen);
+                mCatName = "?"+catKey+"="+catToUse;
+            }
         }
         else
         {
@@ -146,7 +155,7 @@
 	
 	public String getSelfUrl() throws Exception
 	{
-        return mRes.encodeURL(mSelfUrl);
+        return mSelfUrl;
 	}
 
 	public String getTargetUrl() throws Exception
@@ -177,7 +186,7 @@
         {
             if ( day == null )
             {
-                url = mRes.encodeURL(mSelfUrl + mCatName);
+                url = mSelfUrl + mCatName;
             }
             else
             {            
@@ -187,13 +196,13 @@
                 if ( dateString != null )
                 {                
                     // append 8 char date string on end of selfurl
-                    url = mRes.encodeURL(mSelfUrl+"/"+dateString+mCatName);
+                    url = mSelfUrl+"/"+dateString+mCatName;
                 }
                 else if ( valid ) 
                 {
                     // Make the date yyyyMMdd and append it to URL
                     dateString = DateUtil.format8chars( day );
-                    url = mRes.encodeURL( mSelfUrl+"/"+dateString+mCatName);
+                    url = mSelfUrl+"/"+dateString+mCatName;
                 }
             }
         }