-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
5.6.3, 5.6.1, 5.6.4
-
- Mac OSX 10.8.3
- Java 7u51
- Confluence Standalone
- Safari 6.0.3
- Firefox 32.0.3
- Chrome 38.0.2125.104
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>.
- relates to
-
CONFSERVER-25767 HTML macro does not display wiki content properly when html tags used
-
- Closed
-
Hi btom1
Thanks for raising this issue. In this instance I'm going to close this issue out as won't fix. As you are aware the HTML macro allows the user to add arbitrary markup to the page, in order to resolve an issue like this we'd need to start parsing the information added to the macro to ensure that it was compatible with the page that it was being injected into. Given the infinite variation between what the user adds to the HTML macro and what may or may not be on the page it's better to make no assumptions around what is placed into the macro.
Regards
Steve Haffenden
Confluence Bugmaster