Unpredictable URL encoding

I am working with the following:

<img src=’{{ “{{ image }}” }}’ alt=’{{ “{{ name }}” }}’ … other stuff />

The html produced for alt is alt={{name}}, which is desired. However, the src gets url encoded (undesired), src='products/%7b%7b%20image%20%7d%7d'.

Is there a way to eliminate the url encoding on the src?

You cannot nest the curly braces. Instead use printf + safeHTML I.e. do something like:

{{ printf `<img src="%s" alt="%s" … other stuff />` $var_holding_src $var_holding_alt | safeHTML }}