That people produce HTML with string templates is telling us something

The fact that people have continued to use string templates for producing HTML despite numerous articles claiming that it’s wrong means that they must see real advantages in this method over its alternatives. While some suggest that the ease and scalability of string formatting may be factors, others point out that it’s naturally reusable to other contexts as well. However, there are also concerns about the lack of strict structural containment and the risk of XSS attacks. Those seeking to displace string templating should try to understand its current advantages and how to duplicate them in alternative methods.

To top