HTML-Safe ECR Templates

After writing my last post I wondered if I could improve ECR to avoid the need to call HTML.escape explicitly when adding values to the template. This turned out to be much easier than I expected. ECR (Embedded Crystal) is the compile-time templating system included in the Crystal standard library . The syntax is based on ERB (Embedded Ruby), but the template is processed at compile time in a…