Atlassian HTML macro makes saved page redirect to "data:text/html,"

We're preparing to move to Confluence 5.1.3, and in our test installation, one of our pages does something very strange -- when you go from the editor, either saving or cancelling, the page displays briefly, then immediately redirects to a garbage address "data:text/html,<p></p>". That looks like there might be an extra quote mark somewhere when the HTML is rendered.

I've tracked this down to an HTML macro that has some fairly complex HTML in it, but does not have an extra quote or other errors. This does not happen in version 4.0.4, our previous version.

Note that this DOES NOT happen when simply going to view the page, but only when you edit the page and either cancel and save.

4 answers

1 accepted

This appears to be a known bug, probably introduced in 4.3 .

The simplest case that I found is to have an HTML macro containing an empty form with an empty (but povided) action:

<form action="">


Additional data point: this isn't due to the HTML macro -- it also happens when saving one of the page layout templates (e.g., the Global page layout).

is there a registered issue in atlassian's jira project for Confluence???

Found one that seems to be the same. It does not account for the case I saw where this happens when saving a page layout. It looks like this bug was introduced in 4.3.

Tried to narrow it down as much as possible. So, on a clean confluence to reproduce it you need to add following custom html from Confluence Administration:

<a onclick = "f()"/>

Now on any page if you would have inside your content something like:

oNcLiCk = "F()


blahoNcLiCk = "F()))akldf

when saving, previewing or canceling an edit, you would reproduce this behavior.
If you change at least one character in the match (like remove space before or after =, or make it single quote instead of double quote) - you will be able to save the page properly.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

562 views 20 11
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you