Hello,
I have a Jira Automation with a POST webhook call to the Confluence API. The body of the post call is something like this:
{{#issues}}
<p>
{{#comments}}
{{body.jsonEncode}}
{{/}}
</p>
{{/}}
I had an issue where multiline comments would break the call (bad request) so I added jsonEncode to {{body}} which worked, but now when someone is using a special character like < it breaks the call again.
How do I handle characters like < > " ' &
So that my calls don't break? Thanks!
Hi @Ano Niempje
Yes <> are not json character but html characters. You could replace them using remove of replace function.
Automation smart values - text fields | Cloud automation Cloud | Atlassian Support
You could also try to use the htmlEncode fucntion on your smartvalue.
Regards
Thanks I fixed it by changing this:
To this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.