Google Apps Script to complete a HTML template

Continuing the “merge” theme this is a function that fills in a HTML template. I’ve personally used it to complete a template from a draft GMail. The template may end up having HTML tags within the placeholder that aren’t obvious in GMail. This script strips those out.