Resolution: Won't Fix
Affects Version/s: 1.2_04
Fix Version/s: 1.2_05
Operating System: All
If I build a SelectItem (to insert for example in a HtmlSelectOneMenu) that has
in the itemValue a string that has HTML characters, itemValue will always be
escaped even if the escape parameter is false.
Taking a quick look at the specification the escape parameter is only to affect
the itemLabel, and nothing is said about itemValue.
However, always escaping the itemValue is making it impossible to use unicode
characters in itemValue (like Portuguese characters in my case), because:
1) If the original itemValue with unicode characters is used, a validation error
occurs (Value is not valid)
2) If I change the itemValue to it's HTML escaped value, JSF will double escape
itemValue, and a manual hack is necessary to revert the double escaping.
I'm my option there are 4 solutions (in order of correctness, IMHO):
1) itemValue should never be escaped
2) The escape flag should also affect itemValue
3) JSF should always convert unicode characters to the HTML counterparts, since
any unicode character will not pass validation anyway...
4) Change the validator so unicode characters are allowed (breaks HTML spec?)