Intelligently handles HTML input, and is meant to safely handle untrusted templates and substitution variables. Basically, it's designed for mail merge.
David Masover
gem "re_template", "~> 0.0.1.2"