Can't get anchors to work for pages with ( ) in the title.

John Corwith April 19, 2017

My company requires Confluence document titles to start with (PROPRIETARY)

I start with a working anchor  on page:

http://myconfluence.com/display/spacekey/PROPRIETARY+pagename#PROPRIETARYpagename-anchorname

When I put in the parens, the URL for the page changes to:

http://myconfluence.com/display/spacekey/%28PROPRIETARY%29+pagename

So I tried:

http://myconfluence.com/display/spacekey/%28PROPRIETARY%29+pagename#%28PROPRIETARY%29pagename-anchorname

And it links to the page but not the anchor

To complicate matters, I want to use the anchor in a Page properties macro so that it shows up in the Page properties report on a separate page.

The issue here is that I can't use the Insert link/Advanced function to set the anchor to current page#anchorname since Confluence removes the current page and when I run the report, it is looking for the anchor on the report page.

2 answers

0 votes
John Corwith April 20, 2017

It seems all you have to do is have the first character of the title be a number or letter.


So this works

Page title: Companyname (PROPRIETARY) Pagename

http://myconfluence.com/display/spacekey/Companyname+%28PROPRIETARY%29+pagename#Companyname(PROPRIETARY)pagename-anchorname

and this

Page title: Pagename (PROPRIETARY)


http://myconfluence.com/display/spacekey/pagename+%28PROPRIETARY%29#Pagename(PROPRIETARY)-anchorname

This also works

Page title: Companyname (PROPRIETARY/PII) Pagename

http://myconfluence.com/viewpage.action?pageId=00000#Companyname(PROPRIETARY/PII)pagename-anchorname

They all fail the page checker looking for (PROPRIETARY) markings at the beginning of the line but the policy people seem ok with these alternatives.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2017

That's a limitation of html - the brackets need to be escaped in urls, but they can't be used in anchors because the escaped character is not the same as the pages actual name.

I'm afraid you are pretty much stuck, unless your company changes its policy to match internet standards (not using escaped characters in titles)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events