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?
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.