You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2011/06/03 12:35:47 UTC

[jira] [Commented] (WICKET-3766) Strings#escapeMarkup() creates invalid XML for control characters

    [ https://issues.apache.org/jira/browse/WICKET-3766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043287#comment-13043287 ] 

Sven Meier commented on WICKET-3766:
------------------------------------

Sorry, I wasn't aware of this change in 1.5. Please backport it to 1.4.x.

BTW the encoding is a little too strict: 0x09, 0x0a and 0x0d need not to be encoded. IMHO it would be nicer to humans to read the markup if they stayed like they are, i.e. not encoded.

> Strings#escapeMarkup() creates invalid XML for control characters
> -----------------------------------------------------------------
>
>                 Key: WICKET-3766
>                 URL: https://issues.apache.org/jira/browse/WICKET-3766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.4.17
>            Reporter: Sven Meier
>              Labels: escape, unicode, xml
>         Attachments: escapeControlCharacters.diff
>
>
> Most C0 control characters are invalid in XML:
>   http://en.wikipedia.org/wiki/Valid_characters_in_XML
> Besides 0x09, 0x0a and 0x0d all other control characters below 0x20 have to be escaped, see attached patch.
> Currently model objects containing these characters and being rendered (e.g. via labels) will lead to Ajax response failures.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira