Encode/Decode text are not equal

Hi guys!

I have an issue with encode/decode functions. For example I have this code to decode and then encode:

Decode this url with plugin:

The result is: ‘horizontal’, [‘#0e5dc2’, ‘#041b38’]

This works fine! But if I encode the result with plugin/encode column the result is:


So, why I have a different result? I could use another function to have the first result? :sweat_smile:

Looks like it’s not encoding the single quotes. Maybe it doesn’t because it’s probably using encodeURIComponent which I’m finding does not encode certain characters because they don’t need to be.

Is it causing issues down the line? If so, you could run the encoded result through a template column to replace the single quotes with %27.

You could also try this with a javascript column if you want to encode it with just one column.

return encodeURIComponent(p1).replace(/[!'()*]/g, escape);


Thanks Jeff :slight_smile:

Yes it’s causing an issue, so I wil use the js column that you write me !


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.