I'm still using Wicket 1.5 for my applications, so my knowledge of the code is probably out of date. Should this be 1 JIRA issue or 2?
If someone passes in escaped code to: Strings.escapeMarkup() Should the code be escaped twice? Or should Strings.escapeMarkup() be smart enough to recognize that's been escaped and ignore it? Tom Burton -----Original Message----- From: Sven Meier [mailto:[email protected]] Sent: Tuesday, December 17, 2013 11:47 AM To: [email protected] Subject: Re: Should EnumChoiceRenderer really escape the markup? Please open a JIRA issue. Sven On 12/17/2013 09:39 PM, Guillaume Smet wrote: > Hi, > > Currently, EnumChoiceRenderer escapes the value via the postprocess method. > > It seems to be redundant with the fact that DropDownChoice already > escapes the value by default (in AbstractChoice). > > Typically, in a default setup, if you use EnumChoiceRenderer and > DropDownChoice together, your value is escaped twice which leads to a > double escaped value. > > Should I open a JIRA so that we remove the escaping of EnumChoiceRenderer? > > References: > https://github.com/apache/wicket/blob/master/wicket-core/src/main/java > /org/apache/wicket/markup/html/form/EnumChoiceRenderer.java#L111 > https://github.com/apache/wicket/blob/master/wicket-core/src/main/java > /org/apache/wicket/markup/html/form/AbstractChoice.java#L402 > > Thanks for your feedback. >
