Whilst I agree that our JS templating solution needs a lot of love. The string concatenation in your example is actually much slower than regex replace.