Restrictions on web links in Confluence

Some types of URLs to weblinks don't work - you can add them in the editor and "Follow link" during editing works, but both in preview and when saving the page the URL is gone (no href attribute in the <a> tag). Thus: what are the (known) restrictions on URLs for web links?

3 answers

1 accepted

Ah, I see what you mean.

My understanding is that Confluence uses the standard w3c URL conventions, so a pipe would be treated as a delimiter.  This is confirmed (for the pipe) here: https://confluence.atlassian.com/confkb/url-containing-pipe-is-truncated-131989590.html.  I don't have a list of those restrictions to hand but they shouldn't be too hard to find.

However, this won't be much use if your users aren't clued up on this.

Atlassian's recommendation is to use the HTML macro if escaping will be a problem, e.g. due to a large number of existing URLs or frequent use of URLs that need to be treated "as is".  If you're on the Cloud version the HTML macro isn't available so you can use an add-on like this or this, both of which should accept well-formed URLs even if they're not strictly in lie with w3c standards. 

Thanks for the hint to the link, Rob

Hi Martin,

There are no general restrictions. As long as the URL is well-formed it is simple text inside an href.

Can you provide an example link?

Hi Rob

yes, sorry, I should have done that right away: for example SonarQube creates URLs of the form

http://mySonarQube/component_issues?id=org.domain%3Amy.artifact.id#resolved=false|severities=BLOCKER

The '|' is problematic and must be URL-escaped to '%7C' to make it possible to store the URL. While '|' is not in the list of allowed characters in URLs (https://tools.ietf.org/html/rfc3986) obviously it happens, that it is used.

That's why I wanted to know, whether there are other restrictions.

The Confluence Insert Link dialog accepts the entry though but then silently the URL is swallowed. Also when pasting the URL this weird behaviour can be observed:

For example, this is what happens (URL from above just pasted):

http://mySonarQube/component_issues?id=org.domain%3Amy.artifact.id#resolved=false|severities=BLOCKER

 

 

 

I forgot to say, that most users won't have the allowed character list from the RFC in mind all the time wink

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Goff-Dupont
Published 4 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

56 views 2 3
Read article

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