Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2084

Form should decode its link parameters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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);

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: