Special Characters in Jira Tickets Created by Confiforms Automation

Mystify 9762
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2024

 

Hello,

 

We are using Confiforms IFTTT rules on a confluence page to make Jira tickets.

 

We collect up field info like this:

 

            #set($strAddInfo = "[entry.fnField.escapeJSON]"

 

And then build up the json structure to place values in the "description" field of the ticket.

However, when we use some special characters such as quotes ("), we encounter errors on submission, and some characters such as < and > and & become HTML encoded like &gt;. We worked around the quote issue with the subpar but passable solution of adding string replacement with replaceWith(",'') after the escapeJSON directive. However, we are at an impasse with special characters, and have tried various combinations of the confiforms virtual functions - https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions - especially the urldecode and the renderAs* functions.

 

Is there any further documentation or advice around character escaping?

1 answer

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2024

Consider using the 

[entry.fnField.escapeJSON]

inside the description mapping directly and not through the Velocity variable

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2024

Or, alternatively, rename your variable to include Html in a name, so Confluence will not escape the value when processing

#set($strAddInfoHtml = "[entry.fnField.escapeJSON]")

 Something what has been changed in Confluence since version 8 when a variable value is accessed from a velocity context it gets escaped.

To avoid that you can use the Html in the variable name

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events