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

Form should decode its link parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.3
    • 5.3.7, 5.4
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: