Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jonathan Simonoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2013

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

0 votes
Answer accepted
Jonathan Simonoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 7, 2013

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>

0 votes
Juri_Reinsalu June 30, 2013

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.

0 votes
Guy Hood
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 30, 2013

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

Jonathan Simonoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 7, 2013

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.

0 votes
Jonathan Simonoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 24, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events