How can you prevent merging from square brackets with auto-link created by a macro?

I use Atlassian Confluence (woe to me).

I have a {sql} macro inside a groovy macro in a wiki markup block. Now SQL selects rows that look like Foo[Bar] . The results wiki page automatically links the panel, i.e. You are getting

Foo bar

what I do not want. I tried something like

 SELECT REPLACE(REPLACE(name, '[', '\['), ']', '\]') FROM mytable; 

but it caused an error, and

 SELECT REPLACE(REPLACE(name, '[', '\\['), ']', '\\]') FROM mytable; 

did not cause an error, but also did not help. What can I do?

+4
source share
1 answer

Your macro displays a line in wiki markup. A simple solution would be to make sure that you prevent the output from being interpreted as wiki markup by wrapping the result in {html} tags.

+2
source

All Articles