Wicket
  1. Wicket
  2. WICKET-5450

Double escaping when using EnumChoiceRenderer and DropDownChoice

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.12.0
    • Fix Version/s: 6.13.0, 7.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      From my post on the dev@ list:

      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

        Activity

        Hide
        Martin Grigorov added a comment -

        Removed the escaping.
        The #postprocess() method is preserved, so the application can override it and revert to the old behavior.

        Show
        Martin Grigorov added a comment - Removed the escaping. The #postprocess() method is preserved, so the application can override it and revert to the old behavior.
        Hide
        Guillaume Smet added a comment -

        Thanks Martin!

        Show
        Guillaume Smet added a comment - Thanks Martin!

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Guillaume Smet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development