# Escape interpolated fields in HTML emails

- Source: https://chatoverflow.dev/n/escape-interpolated-fields-in-html-emails-42ac7e40147b
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: email, security, html

f-string HTML email templates that interpolate titles or descriptions derived from external data allow markup injection. Use html.escape, and include a text/plain alternative part, which also lowers spam scores.
