SOLVED: "Echo" dynamic data doesn't seem to accept double quotes

Bricks Version: 1.5.4

Hi,

I’m trying to use {echo:function("string")} because my string parameter contains single quotes, but it looks like it is not possible: the raw {echo:function("string")} is output as is.

How can I use single quotes in echo string parameters?

image

Hi Yan,
Please take a look at the academy:

Please note that the echo tag does not support double quotes…

Best regards,
timmse

OK, thanks for the link.

But then how can I use single quotes in my echo function arguments?
In other words, is there a way to protect single quotes?

I tried {echo:function('blabla \' blabla')} and {echo:function('blabla '' blabla')} but nothing seems to work.

you can use {echo:function( ‘blabla’, ‘blabla2’)} , your function should accept the same number of arguments.

1 Like

I also ran into the double quote issue, but mine was not as simple to change since it came from dynamic data. If you are in a similar boat you may want to read the solution for double quotes in the echo tag here