Input fields in /api/jsonws page for functions do not support multiline/newline-inclusive parameters

      Steps to reproduce

      1. Start a clean bundle
      2. Login as admin
      3. Add the Calendar widget into the home page
      4. Click on My Calendars > ▼ > Manage Calendars
      5. Click on Options icon and HOVER on Import
        From the linked URL, note the xxx_calendarId value (30824)
      6. Go to http://localhost:8080/api/jsonws
      7. Select Calendar as Context name
      8. Click on Import-Calendar method
      9. Fill in the calendarId retrieved on step 5
      10. Set type as "ics"
      11. Open the attached ics file in your favorite editor
      12. Convert all linebreaks to \n so it's a 1 line string
      13. Copy that string into the Data field and Invoke


      Actual results
      Field is rendered as Input tag and execution fails

      The following error is displayed

      "Error at line 1:Expected [VCALENDAR], read [VCALENDAR\\nMETHOD]"

      Expected results
      Field is rendered as Textarea tag and execution succeeds

      Example of expected:

      1. Open the browser's development tools
      2. Change the <input to <textarea to convert the Data field to a textarea
      3. Paste the contents of the ics file (as is, with linebreaks)
      4. Invoke
      5. Execution is successful


      Reproduced in
      7.0.x (b0c47f5f335c5d32d2949b6bd54374eadc428c23)
      7.1.x (cc4ecbff91a19e3206cc5bdca1060804cee6a8b1)
      master (d6e4f5c6b99aa7c69b8907d0377d458cd2ff22ad)

      * Please see Zendesk Support tab for further comments and attachments.


        1. master.mp4
          3.50 MB
        2. result.PNG
          19 kB
        3. sample.ics
          0.8 kB



            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created:
                Days since last comment:
                20 weeks, 6 days ago