Tapestry 5
  1. Tapestry 5
  2. TAP5-2084

Form should decode its link parameters

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.3.7, 5.4
    • Component/s: None
    • Labels:
      None

      Description

      The Form component will add all its action event link parameters as hidden inputs, but link parameter's value is encoded and hidden input field value is not, because of that parameter's value will be encoded on arrival.

      simple request:
      //add parameter to the link
      link.addParameter ("abc", URLDecoder.encode(abcValue, "UTF-8"))
      on event:
      request.getParameter("abc") is equals to abcValue

      form request:
      // add parameter to the form action link using the LinkCreationHub
      link.addParameter ("abc", URLDecoder.encode(value, "UTF-8"))
      on event:
      request.getParameter("abc") is not equals to abcValue, parameter's value is encoded

      It could be fixed by decoding parameter's value at line:

      writer.element("input", "type", "hidden", "name", parameterName, "value", value);

        Activity

        Kalle Korhonen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.3.7 [ 12323355 ]
        Fix Version/s 5.4 [ 12316401 ]
        Resolution Fixed [ 1 ]
        Kalle Korhonen made changes -
        Assignee Kalle Korhonen [ kaosko ]
        Denis Stepanov made changes -
        Field Original Value New Value
        Attachment 0001-TAP5-2084-Form-should-decode-its-link-parameters.patch [ 12576581 ]
        Denis Stepanov created issue -

          People

          • Assignee:
            Kalle Korhonen
            Reporter:
            Denis Stepanov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development