You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Kevin Brown (JIRA)" <ji...@apache.org> on 2008/08/22 19:02:44 UTC

[jira] Commented: (SHINDIG-482) HttpGadgetContext.getUserPrefs() doesn't decode German umlaute correctly

    [ https://issues.apache.org/jira/browse/SHINDIG-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624902#action_12624902 ] 

Kevin Brown commented on SHINDIG-482:
-------------------------------------

Could you be more specific in describing your request? Is this happening against the PHP or Java build? What is the request url?

encodeURIComponent is always the correct way to encode CGI arguments. escape is non-standard and does not correctly escape all unicode sequences. 

When the user prefs are passed to the page properly encoded, using encodeURIComponent or any other escaping mechanism that correctly converts all UTF-8 octets to the hex encoded form, it works just fine in the Java build.

> HttpGadgetContext.getUserPrefs() doesn't decode German umlaute correctly
> ------------------------------------------------------------------------
>
>                 Key: SHINDIG-482
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-482
>             Project: Shindig
>          Issue Type: Bug
>         Environment: any
>            Reporter: christof kaleschke
>
> When the user prefs contain values with German umlaute (like ä, ü, ö) they aren't decoded correctly in the HttpGadgetContext.getUserPrefs() method. 
> It seems that it is assumed (later in the JavaScript that is returned to the browser)  that these user prefs are encoded with encodeURIComponent() and the sample container encodes the user prefs with encodeURIComponent in the method gadgets.IfrGadget.prototype.getUserPrefsParams(). I tried to simply change the .getUserPrefsParams() method to use escape() but then I get JavaScript errors later on when I call var prefs = new gadgets.Prefs(); in the gadget.
> In my opinion it would be enough to encode those user prefs with escape().

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