I have the following two cases where I want to use an EJS tag inside an HTML attribute.
CASE 1:
<input
style="background-image: url(<%= img.URL %>)"
/>
CASE 2:
<input
onchange="handleCheckboxChange(<%= img.URL %>)"
/>
I am unable to figure out why is it not working. The img object is passed correctly while rendering the template.