Hi there,
I have defined in my workflow a mutate element, that works in 2 steps:
- it “strignifies” the data.query object
- it encodes in Base 64 the stringified value obtained from 1
I noticed that the base64 encoding systematically appends 2x = at the end of the string, making it unreadable in my application.
Are you aware of any bug or limitation ?
Are you using two curly braces - {{ - or three curly braces - {{{ around your encodeBase64 call? Handlebars html escapes content when using two curly braces (http://handlebarsjs.com/#html-escaping), and so the ‘=’ signs at the end of base64 values are probably getting html escaped. You probably want to use the triple curly braces, to bypass the html escaping.
Inded, I was using 2 curly braces - using 3 fixes the issue
Thanks,
Indeed . And for future references, I had to use 3 curly braces at two places:
- at the mutate block level:
{{{encodeBase64 data.query.myfield}}}
- but also at the subsequent http POST block:
{ "Data": "{{{data.query.encoded_query}}}", }