This issue is relevant when building a <f:selectOneMenu> and one of the
SelectItem has an itemValue that contains Unicode characters (like Ã§, Ã¡, Ã£).
On submit the validation fails due to the invalid characters.
This is a serious issue because many applications have decode tables that are
build by interface from outside systems, and one day you can wake up with a
The workaround is to manually escape (using for example
StringEscapeUtils.escapeHtml) when building the SelectItems and unescaping
manually on receive.
The current behavior is always escaping itemValue, so this leads to a
However, I believe this problem might be solved by changing the validation, and
not changing the ResponseWriter.
Looking at the HTML4 Spec I have found no hint that the existing restrictions on
Unicode characters should ever exist for itemValue since the "value" attribute
on the <OPTION> element is defined as CDATA, so Unicode characters should be
I think the validation of the itemValue should be relaxed to allow more complex
values, like strings with Unicode characters.