Confluence Support Non-http/ftp Hyperlinks?

Does Confluence support hyperlinks to pages that don't have a "http" or "ftp" in front of it?

For instance, svn or starteam links?

2 answers

1 accepted

Alright, after a good day of work I've managed to come up with a three-part solution:

Since this is as a result of the UWC working its conversion magic (thank goodness we have UWC!), "illegal" characters were getting removed. The problem with this is that colons, semi-colons, and forward-slashes are all part of the standard Starteam link. This was overcame by "escaping" those illegal characters. Like so:

[settings.illegalcharmap.properties]
# : (colon)
illegalchar.colon.replacement=\:

# ; (semi-colon)
illegalchar.semicolon.replacement=\;

# / (forward slash)
illegalchar.forwardslash.replacement=\/

# @ (at)
illegalchar.at.replacement=\@

Why the ampersand (@)? We'll get to that later...

This got us as far as getting the UWC to convert the Starteam links into something that's copy/pastable into Starteam. Although it did chop off the prefixed "starteam://" from the link itself, it was still somewhat "followable."

Here's the next bit of UWC regular expression magic:

[converter.mediawiki.properties]
Mediawiki.0411.starteam.java-regex=\[starteam://(\S+)+\s*(.*)\]{replace-with}$2: [$1@starteam]

This regular expression will take all bracketed links prefixed with "starteam://" and throw it into a Starteam shortcut link.

A shortcut link, you say? Why yes, a shortcut link!

You can get to this as a Confluence Admin by going to Browse->Confluence Admin, and click on "Shortcut Links" under "Configuration." In effect, this is why we needed the ampersand to be escaped back in the [settings.illegalcharmap.properties] file.

So, what does this do? Well, the help text just above the shortcut link table explains it pretty well. But pretty much what it does is it takes your Starteam link, prefixes it with "starteam://" and wraps the link tag around the text "Starteam Link".

So, typing in [starteam://my.starteam.link/a:12345;b:67890 Software Plans Summary] in a WikiMedia page will give you the hyperlinked text "Software Plans Summary".

When shoved through the UWC (with the options from above), you get the following:

Software Plans Summary: [my.starteam.link/a:12345;b:67890@starteam]

Which simply ends up looking like this on a Confluence page:

Software Plans Summary: Starteam Link 

Hi Phillip,

It might be worth raising a ticket at support@atlassian.com to ask which links Confluence strips out. I've done a quick test using the $wgUrlProtocols for MediaWiki as documented at http://www.mediawiki.org/wiki/Manual:$wgUrlProtocols and Confluence 4.1.2 (the version I tested on) strips out:

  • gopher
  • telnet
  • worldwind
  • mms

but did leave svn, ftp, irc, nntp, etc. alone. I also tried a link using starteam:// and this got stripped out as well.

As mentioned above it might be worth contacting support@atlassian.com for a definitive list as I can't find anything in the documentation about which links Confluence strips out and which it leaves alone.

Hope that helps,

Andrew.

This is another one of those questions where I probably should have indicated that I'm using the UWC to convert our MediaWiki into Confluence. starteam links have a few of those illegal characters in them and so right now I'm exploring encoding the URL so that no actual damage is done to the link. I'll post back if I figure anything out.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

71 views 0 11
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