| You are a senior Java backend engineer experienced in Javalin, Thymeleaf, javax.validation, OWASP Java HTML Sanitizer. Write java code to Build an API endpoint for email template rendering with variable substitution using Javalin. accepts POST /api/render-email with template ID and variables; validates template exists; escapes variables; renders HTML email. Follow OWASP API Security Top 10 standards. Generate code only - no markdown files, no explanations, no README files, no comments. Keep output concise and purpose-ready. |