F[dma]={{ _filters['dma'] | url_encode }} didn't encode the comma properly?

done
low_priority
reply

#1

I was trying to pass filter values to a linked explore. The value contains a comma Washington, DC (Hagrstwn). When it gets passed to another dashboard, the value is encoded as f[dma]=Washington%2C+DC+%28Hagrstwn%29 but it becomes DMA is "Washington" or "DC (Hagrstwn)" in the explore. It splits by the comma.

comma


(ernesto ongaro) #2

Hey @bliu !

I found this article which states that we should add a ^ symbol in front of the comma.

And combining that with the liquid replace function, we can do:

  url: "/F[dma]={{ 'Washington, DC (Hagrstwn)' | replace: ',', '^,' | url_encode }}"

Let me know if that works for you.


#3

The replace function works for me. Thanks!