Confluence 5.3 has reached end of life
Check out the [latest version] of the documentation
The HTML Include macro allows you to include the contents of an external HTML file in a Confluence page.
CAUTION: Including unknown HTML inside a webpage is dangerous.
HTML can contain active scripting components. This means that it would be possible for a malicious attacker to present a user of your site with script that their web browser would believe came from you. Such code could be used, for example, to steal a user's authentication cookie and give the attacker their Confluence login password.
Using the HTML Include Macro
To insert the HTML Include macro into a page:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
Speeding up macro entry with autocomplete:
To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.
The information on this page does not apply to Confluence OnDemand.
Parameters
Parameters are options that you can set to control the content or format of the macro output.
Parameter | Default | Description |
---|---|---|
HTML Page's URL | None | The URL of the page to include. |
Troubleshooting
- The HTML Include macro will only be available if it has been enabled by your Confluence administrator. Also, your Confluence Administrator can define a whitelist of trusted URLs. You will see an error message on the Confluence page if the included URL is not in the whitelist.
- You can only use the HTML Include macro for pages with absolute links. If you use the macro to include an HTML page that has relative links, navigating those links in the wiki results in a 'Page Not Found' error. See CONF-6567.
Code examples
See: