You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "christof kaleschke (JIRA)" <ji...@apache.org> on 2008/07/30 14:59:31 UTC

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

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.


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

Posted by "Vincent Siveton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton resolved SHINDIG-482.
-------------------------------------

    Resolution: Cannot Reproduce

Close due to no response. 
Feel free to reopen it *with* more comments and ideally a test case.

> 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.


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

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ 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.