[ https://issues.apache.org/jira/browse/WICKET-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534636 ]
Juergen Donnerstag commented on WICKET-1054: -------------------------------------------- please see the javadoc for Component#getModelObjectAsString(). Default is HTML escape only. If you require all none-ascii chars than please use String.escapeMarkup(component.getModelAsString(), false, true)) Juergen > No way to escape html markup but keep non-7 bit characters in generated output > ------------------------------------------------------------------------------ > > Key: WICKET-1054 > URL: https://issues.apache.org/jira/browse/WICKET-1054 > Project: Wicket > Issue Type: Improvement > Components: wicket > Affects Versions: 1.3.0-beta3 > Reporter: Marat Radchenko > Assignee: Juergen Donnerstag > Fix For: 1.3.0-beta5 > > > from Component#String getModelObjectAsString(Object): > == > if (getFlag(FLAG_ESCAPE_MODEL_STRINGS)) > { > // Escape it > return Strings.escapeMarkup(modelString, false, true).toString(); > } > return modelString; > == > As you can see, we have two options. > 1) Output will be html-escaped and all non-7 bit characters will be replaced > with &#....; codes. > 2) Nothing will be escaped. > These might be enough for ASCII-speaking people but not very friendly for > others. > We need third option: > escape html-sensitive characters (&, <, >, etc) and do not modify all other > characters because it is very difficult to view html-escaped page source and > search engines are not happy with it. > This can be done by replacing if {} body with following code: > return Strings.escapeMarkup(modelString, false, false).toString(); > Maybe some additional flag could be added in order to support such behavior? > Hope this will be fixed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.