Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-73283

Using pipe | in macro causes AP.confluence.getMacroData to corrupt macro data

XMLWordPrintable

      Issue Summary

      Hi team! I am working with Servicerocket in a ticket related to Confluence connect macros. They develop Scaffolding Forms & Templates and currently they have found an issue with their app.When filling one of their Field Group macros with a | (pipe character) anywhere in the body, getContentMacro fails to retrieve the data. They have added more details in the ticket but I could also replicate it with the same exceptions in my testing environment. My understanding is that not many customers would use a pipe character, however, when they do their Live Templates are rendered completely useless.

      Please see these tickets and page for a full writeup (from the Connect team). The Connect team has passed this over to the Confluence team as it pertains to Confluence specific connector code:

      https://hello.atlassian.net/wiki/spaces/~890104860/pages/1444578329/OC-1809+AP.confluence.getMacroData+fails+on+pipe+character

      https://atlassian.slack.com/archives/CFGTZ99TL/p1637788223014600

      https://atlassian.slack.com/archives/CFHD7ERB4/p1639000206445000

      Steps to Reproduce

      Full reproduction steps can be found in the DEVHELP ticket: https://ecosystem.atlassian.net/browse/DEVHELP-7375

      Expected Results

      User can include a pipe character in their macro.

      Actual Results

      Trying to parse the JSON returned by `AP.confluence.getMacroData` fails with an `Unexpected end of JSON input` error, as the data returned is chopped off at where the pipe character was.

      Workaround

      Don't use the pipe character.

              Unassigned Unassigned
              75de3361858b Sam Leatherdale
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: