- From: Chuck Houpt <chuck@habilis.net>
- Date: Wed, 6 Mar 2024 16:37:48 -0500
- To: Gav 'Spammy' HB <iamslowtrain@gmail.com>
- Cc: W3C WWW Validator <www-validator@w3.org>
> On Mar 6, 2024, at 7:41 AM, Gav 'Spammy' HB <iamslowtrain@gmail.com> wrote: > > Hi, > > I am using a base.html document as a template for other pages using the templating engine Jinja2. The validation throws an error with the line, The template file is a mix of HTML and Jinja markup, so it naturally won't often be valid HTML. The file base.html's extension is confusing since it isn't strictly HTML -- it's a template to generate HTML. The Jinja docs even suggest using file names like `base.html.jinja` to make the distinction clear: https://jinja.palletsprojects.com/en/3.0.x/templates/#template-file-extension So, you'll want to validate the *output* of the template. I.e. the page generated by Flask/Jinja. Cheers - Chuck
Received on Wednesday, 6 March 2024 21:38:06 UTC