Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

mailto: link works in edit mode but not after save?

Warren LaFountain August 2, 2016

I'm working on a Knowledge Base Space and had an idea that service would be enhanced if a support link could be emailed right from the sight. After some trial & error I created this link:

mailto:?subject=iPhone Screen Rotation&body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank You.%0D%0A%0D%0A

It works in edit mode but stops being a link once I hit save.

Does anyone know how I can preserve the link on the page?

 

8 answers

1 accepted

1 vote
Answer accepted
Steven F Behnke
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.
August 2, 2016

Yes exactly. Can I ask if you're on Confluence Cloud or Confluence Server? I have a quick workaround but it only works on Confluence Server.

If your instance of Confluence has the {html} macro enabled, you can enter the HTML manually – 

<a href="mailto:?subject=iPhone Screen Rotation&body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank You.%0D%0A%0D%0A">Text here</a>

I haven't found a way around Confluence stripping it out yet.

Warren LaFountain August 2, 2016

I'm just becoming familiar with Confluence. How would I go about requesting that they fix the stripping problem? It wouldn't be so bad if it also didn't work in edit, but it does sad.

Like chris.brama likes this
Steven F Behnke
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.
August 2, 2016

I'm looking around the web – There's related questions here on Answers but none seem to have a distinct feature-request linked to them.

I have a theory – The Confluence editor is based on TinyMCE – I believe TinyMCE supports this style of links but the XML format Confluence uses doesn't. I actually believe this style of link is generating invalid XML markup, so Confluence rejects it.

I think you should also look into User Macros – Administrators in your system can define a new User Macro which you can input parameters into. This could possibly be a good and fast work-around, if you're able to add these.

Steven F Behnke
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.
August 2, 2016

There appears to be an older Bug Report here – https://jira.atlassian.com/browse/CONF-24880

It's a little out of date – The editor has changed since then, thus the bug presents differently than described in the Bug Description. The presented workaround in the comments appear to be to use User Macros or to escape the characters properly. I am not sure if they still are applicable. 

Warren LaFountain August 4, 2016

Hi Steven

I've copied the space over to our UAT environment (where I have more admin privileges). The HTML macros are enabled, and I've copied the HTML from your previous post. When I try the link, it still strips the code and in edit mode, it now goes to a page not found error.

Any ideas on what I can try now?

Steven F Behnke
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.
August 5, 2016

Arghh!! I thought I had it worked out – 

Mine works properly, the exact example I used. To be more specific, I'm using Confluence 5.9.5. I would imagine (but could be wrong) that it would work for you too. If you changed something, could you post the new content so we can inspect it?

1 vote
zaphnet May 16, 2019

Similar problem with "#" in email addresses.

mailto:#example@example.com will not "pop" email dialog and will not be editable after save.

Workaround with html macro: 

<a href="mailto:#example@example.com?subject=Testing out mailto!">#example@example.com</a>

Problem repeated on Confluence 6.14.3 Server.

Not sure that I agree that problem is "Solved" when there is a workaround? Why not stick to the html standard instead? But I guess its what the company finds being the company standard? Good enough or do it right?

1 vote
Steven F Behnke
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.
August 2, 2016

I would suggest trying to insert the macro from the Insert > Other Macros dialog. If it doesn't appear, it is disabled still.

The admin must find the HTML macro add-on and enable the HTML macro module. The documentation is located here – https://confluence.atlassian.com/doc/html-macro-38273085.html

0 votes
Derek Price October 4, 2018

I'm still seeing this problem in Confluence Cloud.  The link worked until I published the page, then it gets scrubbed.   I may try the .msg file as a workaround.

0 votes
Rodney Hughes
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.
August 2, 2016

Not sure if this is too simplistic for whatever you are trying to do

But just type or paste the email address into the body of the page - in normal view when the User clicks the email address it will open a blank email for them.

Or another method is to create a "template" email on your PC complete with To, CC, subject, text and attachments ...
Then (I know I can do this in Outlook) just select that draft and drag it on to your desktop - it becomes its own ".msg" file.
Now attach that file to your Confluence page.
When a User clicks the ".msg" file link on the page, it opens up a copy of the template email for them to edit and send.

 

0 votes
Warren LaFountain August 2, 2016

We're on a Confluence server (recent update I think). How can I find out if the HTML macro is enabled and if it isn't are there very explicit instructions I can pass onto our admins?

0 votes
Warren LaFountain August 2, 2016

Is this what you're looking for?

 

mailto:?subject=iPhone Screen Rotation&amp;body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank You.%0D%0A%0D%0A

mailto:?subject=iPhone Screen Rotation&body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank You.%0D%0A%0D%0A

0 votes
Steven F Behnke
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.
August 2, 2016

can you post the link in a {noformat} macro so we can see the URL in it's full glory?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events