abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r589214 - /incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
Date Sat, 27 Oct 2007 20:43:02 GMT
Author: jmsnell
Date: Sat Oct 27 13:43:01 2007
New Revision: 589214

URL: http://svn.apache.org/viewvc?rev=589214&view=rev
Log:
Tweak the slug sanitization algorithm so the output makes more sense

Modified:
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java?rev=589214&r1=589213&r2=589214&view=diff
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/EncodingUtil.java
Sat Oct 27 13:43:01 2007
@@ -31,7 +31,7 @@
 
 public class EncodingUtil {
 
-  public static final String SANITIZE_PATTERN = "[^A-Za-z0-9\\%!$&\\\\'()*+,;=]";
+  public static final String SANITIZE_PATTERN = "[^A-Za-z0-9\\%!$&\\\\'()*+,;=]+";
   
   public static String sanitize(String slug) {
     return sanitize(slug, null, false, null, SANITIZE_PATTERN);
@@ -85,8 +85,6 @@
               slug, form);          
           slug = value.toString();
         } catch (Exception e) {}
-      } else {
-        slug = Escaping.encode(slug, Constants.PATH);
       }
       if (filler != null) {
         slug = slug.replaceAll(pattern,filler);



Mime
View raw message