fix js templating: embed, append and prepend.