abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Wells (JIRA)" <j...@apache.org>
Subject [jira] Commented: (ABDERA-150) EncodingUtil.sanitize() behavior has changed
Date Mon, 21 Apr 2008 23:51:21 GMT

    [ https://issues.apache.org/jira/browse/ABDERA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591120#action_12591120
] 

Todd Wells commented on ABDERA-150:
-----------------------------------

java.net.URLEncoder encodes a space as '+'.  The change in behavior of sanitize()  along with
http://mule.mulesource.org/jira/browse/GALAXY-199 is giving me a headache.  My point is the
behavior of sanitize() (which was EncodingUtil.sanitize() in 0.3 before it was deprecated
in 0.4) changed between 0.3 and 0.4 and yes, it actually did support percent-encoding in version
0.3 which is why my existing code that relied on that behavior is now broken.  EncodingUtil.sanitize()
now does the same thing and EncodingUtil.encode() appears intended for mime encoding, not
URL encoding.

> EncodingUtil.sanitize() behavior has changed
> --------------------------------------------
>
>                 Key: ABDERA-150
>                 URL: https://issues.apache.org/jira/browse/ABDERA-150
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>            Reporter: Todd Wells
>
> In the 3.0 client, EncodingUtil.sanitize() would escape a space in a String correctly
-- with "%20".  Now it replaces it with an underbar ("_").
> Sanitizer.sanitize() does the same thing.  So existing code that depended on this method
is now broken.  
> For example when using Abdera with Mule Galaxy, it has a default URL that includes a
space for it's atom feeds "Default Workspace", so the Abdera sanitizer couldn't be used reliably
since it would make this "Default_Workspace".  And looking at the code, sanitize only allows
to to specify a particular slug to replace all undesired characters with -- so blindly saying
replace with "%20" means that all undesired characters would be replaced with that, rather
than with the proper HTML encoding.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message