Stop confluence code block macro from creating anchors when period is present in code

ebrettingham January 11, 2019

My code inside a code block has anchors being created when a period is used. For example an sql block like this:

 

select a.column1 , b.column2

from tablea a, tableb b

where a.column1 = b.column1;

 

all of the instance of a. and b. are turned into hyperlinks to https://<confluence url>/a.column1

1 answer

1 accepted

0 votes
Answer accepted
Davin Studer
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.
January 11, 2019

What version of Confluence are you using? I have tried using the code block macro and your text above in both my Confluence Server and Confluence Cloud environment and I don't see the behavior you are seeing.

ebrettingham January 11, 2019

Confluence 6.10.1 - see image below I hover over a.column1 and it is a hyperlink

Capture.PNG

Davin Studer
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.
January 11, 2019

Hmmm. I've tried this on my 6.8.1 and 6.12.2 environments and do not see that behavior. Do you have the Confluence Source Editor app? If you don't it's made by Atlassian and free. It lets you edit the storage format code behind a page. If you do I would look at the storage format behind your code block macro and see is something wonky snuck in somehow.

ebrettingham January 11, 2019

Thanks David. I've asked my admin to take a look. I will update with what he finds.

Richard Burstiner
Contributor
January 11, 2019

I can reproduce the same behavior with and without the SQL formatting in the same version as Eddie.

Here is the test:

Capture.PNG

The View Source Format looks like:

<ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="8752248f-b279-43a3-a254-ea21a404f861">
<ac:plain-text-body>
<![CDATA[acolumn a.column1]]>
</ac:plain-text-body>
</ac:structured-macro>
Davin Studer
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.
January 11, 2019

Looks like maybe you are experiencing this bug.

CONFSERVER-56218

Like Richard Burstiner likes this
Richard Burstiner
Contributor
January 11, 2019

Thanks for finding that! We'll have to do an upgrade soon.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events