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 widget could not be displayed.

This appears to be a known bug, probably introduced in 4.3 https://jira.atlassian.com/browse/CONF-27287 .

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

<form action="">

</form>

This widget could not be displayed.

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).

This widget could not be displayed.

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

Found one that seems to be the same. https://jira.atlassian.com/browse/CONF-27287. 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.

This widget could not be displayed.

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:

1
<a onclick = "f()"/>

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

1
oNcLiCk = "F()

e.g.:

1
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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

477 views 6 6
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