Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-33271

Malformed XHTML can exist in page storage format and causes various issues with editing and commenting

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      We believe people have gotten into this state by copying content from web pages and pasting it into the editor. The steps below to reproduce require manual database intervention solely because it's simpler than finding malformed HTML to copy.

      The two examples we have so far are with empty <img /> tags and empty <div /> tags.

      Empty Div Tags

      To reproduce:

      1. Create a page and save it.
      2. Find the page in BODYCONTENT in the database
      3. Run this to add an empty div tag:
        update bodycontent set body = '<div />' where bodycontentid = the-id;
        
      4. Restart Confluence.
      5. Try to add a comment, and you will see the comment box has a smaller grey box inside, and you cannot type into it.

      Workarounds

      • Install the Confluence Source Editor, and use it to find and remove the empty tag
      • View the source of the page in your browser and searching for the empty tag, then remove it in Edit mode.

      Empty Img Tags

      To reproduce:

      1. Create a page and save it.
      2. Find the page in BODYCONTENT in the database
      3. Run this to add an empty img tag:
        update bodycontent set body = '<img />' where bodycontentid = the-id;
        
      4. Restart Confluence.
      5. Edit the page and try to add a macro by typing a leading '{'. The macro list does not appear.

      Workarounds

      • Go to Insert and Other Macros, then select a macro from there.
      • Install the Confluence Source Editor, and use it to find and remove the empty tag
      • View the source of the page in your browser and searching for the empty tag, then remove it in Edit mode.
      • Add some text underneath where the empty tag is and then go to a new line. The macro browser will then appear and you can enter macros.

      Attachments

        1. empty div tag.png
          empty div tag.png
          18 kB
        2. empty img tag.png
          empty img tag.png
          16 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dunterwurzacher Denise Unterwurzacher [Atlassian] (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: