Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-33399

Curly braces can break macros in WYSIWYG Editor

    XMLWordPrintable

    Details

      Description

      If you put curly braces (e.g. "{}") in macro string parameters, the macro is likely to break in the WYSIWYG editor, but it will work on the final page. If you escape the curly braces like

      \{

      it will work in WYSIWYG, but show a wrong result on the real page

      What will break?

      • If it's a macro with macro body, the preview will lose it's icon and it's description text (name and selected parameters).
      • If it's a macro without a body, the preview gets stuck loading with all controls like "save" or "preview" disabled.

      How to reproduce

      1. Edit a page with WYSIWYG Editor
      2. Add a macro (panel macro for "macro with body" or gallery macro for "macro without body")
      3. Edit the added macro in Macro Browser
      4. Enter some text with curly braces into a string property field
        • e.g. use the text test{ - opening curly brackets are more likely to break everything
        • for the panel macro you can add the text to the param "title"
        • for the gallery macro you can add the text to the param "title", too
      5. Hit the Macro Browser's save button.
      6. Look at the macro in the WYSIWYG Editor
        • the panel macro won't have an icon or text anymore, the bar at the top will be blank
        • the gallery macro got stuck loading, blocking the "save" and "cancel" controls

        Attachments

        1. broken-macros-annot.png
          33 kB
          Robert Worgul
        2. CONFSERVER-33399-6157-unable to replicate.png
          43 kB
          Monique Khairuliana
        3. CONFSERVER-33399-gallery-6157-unable to replicate.png
          48 kB
          Monique Khairuliana

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              robert.worgul Robert Worgul
              Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: