You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Major Peter (JIRA)" <ji...@apache.org> on 2011/01/13 19:47:45 UTC

[jira] Created: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

TextField shows HTML entities instead of UTF-8 characters
---------------------------------------------------------

                 Key: WICKET-3330
                 URL: https://issues.apache.org/jira/browse/WICKET-3330
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5-RC1
            Reporter: Major Peter


It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Updated: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

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

Martin Grigorov updated WICKET-3330:
------------------------------------

    Fix Version/s:     (was: 1.5-RC2)
                   1.5-RC1

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC1
>
>         Attachments: WICKET-3330.patch, wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Commented: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981486#action_12981486 ] 

Martin Grigorov commented on WICKET-3330:
-----------------------------------------

I broke it with another change. Will be fixed tomorrow

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3330.patch, wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Updated: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

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

Pedro Santos updated WICKET-3330:
---------------------------------

    Attachment: WICKET-3330.patch

Patch just seting the escape model string property to false by default. I think this would be the correct fix.

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>         Attachments: WICKET-3330.patch, wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Assigned: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

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

Martin Grigorov reassigned WICKET-3330:
---------------------------------------

    Assignee: Martin Grigorov

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3330.patch, wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Updated: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

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

Major Peter updated WICKET-3330:
--------------------------------

    Attachment: wicket-3330.tar.gz

Simple sample project.

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>         Attachments: wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Commented: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

Posted by "Attila Király (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981500#action_12981500 ] 

Attila Király commented on WICKET-3330:
---------------------------------------

Only slightly related but it seems there is an other inconsistency. Different escaping is used when there are field errors and when not.

To reproduce:
Add a string min length validator (with 10 length) to the "field" textfield in Péters quickstart
Load up page in browser and type in this (WITH quotes): 'áé<&>' (its short only 7 chars) and post.
Note that now the "áé" characters will not get escaped but the other characters will. If you send more than 10 characters everything will be escaped as in the original example.

The reasons seems to be in markup.html.form.FormComponent.getValue(): there is an if that is based on the errors in some way.
If there was an error Strings.escapeMarkup(rawInput) (its like Strings.escapeMarkup(rawInput, false, false)) is called.
If there was no error Strings.escapeMarkup(modelString, false, true) is called in Component.getDefaultModelObjectAsString(Object).
That last boolean parameter decides if unicode characters need escaping or not. Next to disabling model string escaping by default this should be fixed too (I am for not escaping unicode parameters).

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3330.patch, wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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


[jira] Resolved: (WICKET-3330) TextField shows HTML entities instead of UTF-8 characters

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

Martin Grigorov resolved WICKET-3330.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC2

Fixed with r1058909

> TextField shows HTML entities instead of UTF-8 characters
> ---------------------------------------------------------
>
>                 Key: WICKET-3330
>                 URL: https://issues.apache.org/jira/browse/WICKET-3330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Major Peter
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC2
>
>         Attachments: WICKET-3330.patch, wicket-3330.tar.gz
>
>
> It looks like that for some reason now the TextFields (at least, could be other FormComponents too) shows HTML entities instead of UTF-8 characters. See the attached quickstart for example.

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