How to handle special chars in Query Parameters

In my query I want to request some data from a mysql-database.

The Query is something like the following:

select field1, field2
from table
where field3 = :name

The actual query is more complex but that won't change anything for this example.

My Problem is that the name I am search for consits of characters like &,...

When I add the macro (with active debug) to the page and use 'test1 & test2' as Value for name, the debug information shows that the vaule is cut at the special char.

Debug information.
Query: test
Query parameters: [name=test ]
Query execution time: 49 ms
Template parameters: []


How to handle this?

5 answers

1 accepted

0 votes
Answer accepted

Hi Lukas! Can you check if this version fixes your issue? Is a pre-release of version 2.0.8.


Thanks it is working now with that version.

Great! Can you work with this version for a few days and provide feedback if any errors occurred?

I we see any error, I will report it.

Hi Lukas,

You are right, using the "&" character is currently not possible for query parameters. This is definitely something we need to fix soon. I created an issue internally and I'll let you know as soon as it is fixed.

Regards, Felix (Scandio)


Thanks for the Info, when is it planed to be ready?


While we're still working on version 2.1, I'm thinking about providing a new minor "hotfix" version for this issue. In that case, you'll have this next week.

Hi Lukas!

Bad news: unfortunately I had to roll-back this solution because it caused serious issues in different cases. I'm still searching for a solution for the issue and I'll try to integrate it in our release 2.1 which will be released soon. I would recommend to switch back to the marketplace version and live with the "&" issue for some more time, since the version I gave you might cause issues as soon as you update PocketQuery to the next official version.

I'm really sorry for the inconvenience and I promise I will find a solution for this!

Regards, Felix (Scandio)

Ok, I think I implemented a good solution. Please install PocketQuery 2.1-m8


ok, we will try to install it within the next days.

Regards Lukas

Testing 2.1 I have issues with the '&' character when is included in an item within the IN clause...

Can you post your query?

What is not working is ... WHERE Field1 IN (:Filter) ... being the "Filter" a ListOfStrings in which one of the items is 'Backup & Restore'...

I found a work around using the replace function in SQL to replace the '&' by the '-' and then it works!!! but what is stored in the (Oracle) database is the 'Backup & Resore'...

Thanks Felix!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

272 views 2 10
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