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

Curly braces can break macros in WYSIWYG Editor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Gathering Impact
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 5.3.1, 5.4.3, 5.4.4
    • Fix Version/s: None
    • Environment:

      Multiple Debian or Ubuntu distributions with either OpenJDK1.7 (using standalone) or Sun JDK 1.6 (using Tomcat6)

      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

          Activity

            People

            • Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Last commented:
                1 year, 30 weeks, 6 days ago