template: escape quotes in generated code
handles attribute values and innerText