logo       

roller/src/org/roller/pojos WeblogEntryData.java,1.9,1.10: msg#00088

Subject: roller/src/org/roller/pojos WeblogEntryData.java,1.9,1.10
Update of /cvsroot/roller/roller/src/org/roller/pojos
In directory sc8-pr-cvs1:/tmp/cvs-serv15830/src/org/roller/pojos

Modified Files:
        WeblogEntryData.java 
Log Message:
Added Pierre's fix for encoding permalinks.  I'm not logging the 
UnsupportedEncodingException however, just ignoring it - since this is one of 
those "should never happen".  Would you prefer it get logged?
http://opensource.atlassian.com/projects/roller/secure/ViewIssue.jspa?key=ROL-265

Index: WeblogEntryData.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/pojos/WeblogEntryData.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** WeblogEntryData.java        7 Oct 2003 02:01:54 -0000       1.9
--- WeblogEntryData.java        22 Oct 2003 19:48:44 -0000      1.10
***************
*** 12,15 ****
--- 12,17 ----
  import org.roller.util.Utilities;
  
+ import java.io.UnsupportedEncodingException;
+ import java.net.URLEncoder;
  import java.sql.Timestamp;
  import java.text.SimpleDateFormat;
***************
*** 409,414 ****
                SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
                String dayString=formatter.format(this.getPubTime());
                return "/page/" + this.getWebsite().getUser().getUserName() + 
!                       "/" + dayString + "#" + this.getAnchor();
      }
      
--- 411,425 ----
                SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
                String dayString=formatter.format(this.getPubTime());
+         String lAnchor = this.getAnchor();
+         try
+               {
+             lAnchor = URLEncoder.encode(anchor, "UTF-8");
+               }
+               catch (UnsupportedEncodingException e)
+               {
+                       // go with the "no encoding" version
+               }
                return "/page/" + this.getWebsite().getUser().getUserName() + 
!                       "/" + dayString + "#" + lAnchor; 
      }
      




-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe