Curly braces can break macros in WYSIWYG Editor

XMLWordPrintable

    • Severity 3 - Minor

      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

            Assignee:
            Unassigned
            Reporter:
            rworgul
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: