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

Using HTML tags inside the HTML macro breaks rendering on View and Edit screens

XMLWordPrintable

      Placing a full HTML page (including the doctype declaration, html and head tags) into an HTML macro breaks rendering on both the edit and view screens.

      Steps to Reproduce
      • Enable the HTML macro
      • Add an HTML macro to a page
      • Insert the following HTML:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Untitled Document</title>
      </head>
      <body>
         <h1>Hello world</h1>
         <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </body>
      </html> 
      
      • Save the page

      Upon viewing the page, you'll see that the footer detaches from its position and ends up underneath the body content. See screenshot broken_rendering

      Upon editing the page, you'll see that the edit page is seemingly missing content. See screenshot broken_edit_1.

      The content has actually been pushed down the page, and rendered incorrectly. See screenshot broken_edit_2.

      Additionally, clicking the "Edit" and "Save" buttons do nothing.

      Reloading the edit screen shows the screen as expected.

      This behavior appeared regardless of which browser I used.

      Workaround

      Remove the doctype declaration and <html>, <head> (including anything within the <head>), and <body> tags. Include only the HTML of the actual element you want to use, such as a <form>.

        1. broken_edit_1.png
          broken_edit_1.png
          78 kB
        2. broken_edit_2.png
          broken_edit_2.png
          145 kB
        3. broken_rendering.png
          broken_rendering.png
          287 kB

            shaffenden Steve Haffenden (Inactive)
            btom1 Brian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: