Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.7
    • Fix Version/s: 6.1.0, 1.5.9
    • Component/s: wicket
    • Labels:
      None

      Description

      When the model property of a Button contains html entities (e.g. single quotes), these characters are double escaped: in Button.onComponentTag (getDefaultModelObjectAsString) and in ComponentTag.writeOutput

      1. WICKET-4734.patch
        1 kB
        Andrea Del Bene
      2. double-escaping.tar.gz
        3 kB
        Pieter Vandepitte

        Issue Links

          Activity

          Hide
          Pieter Vandepitte added a comment -

          Current workaround: button.setEscapeModelStrings(false)

          Show
          Pieter Vandepitte added a comment - Current workaround: button.setEscapeModelStrings(false)
          Hide
          Andrea Del Bene added a comment -

          Button should not escape its model in onComponentTag. I think we can safely substitute getDefaultModelObjectAsString with getModel().getObject() and let ComponentTag do its job.
          See patch (no test case broken).

          Show
          Andrea Del Bene added a comment - Button should not escape its model in onComponentTag. I think we can safely substitute getDefaultModelObjectAsString with getModel().getObject() and let ComponentTag do its job. See patch (no test case broken).
          Hide
          Sven Meier added a comment -

          Aligned with TextField: since model value is written into attribute, call #setEscapeModelValue(false) and let ComponentTag do the escaping.

          Show
          Sven Meier added a comment - Aligned with TextField: since model value is written into attribute, call #setEscapeModelValue(false) and let ComponentTag do the escaping.
          Hide
          Sven Meier added a comment -

          Andrea, of course using getModel().getObject() would work fine too, it's just that TextField does it this way (i.e. setEscapeModelValue(false)).

          Show
          Sven Meier added a comment - Andrea, of course using getModel().getObject() would work fine too, it's just that TextField does it this way (i.e. setEscapeModelValue(false)).

            People

            • Assignee:
              Sven Meier
              Reporter:
              Pieter Vandepitte
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development