Access Keys:
Skip to content (Access Key - 0)

html macro

Overview:

The {html} macro allows you to add raw HTML to your pages, but should be used with care...

There are times when Wiki Markup Editor doesn't quite provide enough flexibility and the need arises to add custom HTML tags to a page.

If you don't want to create a user macro or plugin to implement custom HTML on your pages, you can simply embed the custom HTML (including scripting) using the {html} macro.

Including unknown HTML inside a webpage is dangerous. Because HTML can contain active scripting components, 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.

The {html} macro can be used in Comments, Pages, News, profiles and even the Site Welcome Message. If untrusted users have access to add or edit any of these items, you must not use the {html} macro and should instead consider using the html-tag macro.

You should only turn on these macros if you trust all your users not to attempt to exploit them.

Parameters:

{html}HTML content{html}

Your HTML content should ideally be XHTML compatible and can contain CSS and JavaScript.

Examples:

Hints and Tips:

Only enable this macro if you trust everyone (including anonymous users if applicable) who can add or edit content are 100% trustworthy. If you have any doubts at all, do not enable this macro.

This macro allows HTML generated by products such as Macromedia Dreamweaver to be added directly in to pages - if you have a web design agency that wants to have more design freedom then it's an ideal way to enable them to do this.

One of the main benefits of this macro is that it allows you to easily add Forms and JavaScript to your pages should you need to create customised interactive elements. A classic example is shown on our Builder Price List.

You might also find this book interesting.

Frequently Asked Questions:

Q Are the security warnings exaggerated?
A No. If you enable this macro and someone decides to abuse it, you're in for a lot of pain.
Q Can I restrict usage of this macro to specific spaces, content types or users?
A No. If it's enabled, then it can be used anywHere, by anyone with add/edit privileges (remember that all registered users have edit privileges in their profile)!

See Also:



Ask questions, get help and report bugs & issues on our Community Site

View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence