HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.82k stars 84 forks source link

W3C validator shows some errors #236

Closed eklausme closed 1 year ago

eklausme commented 1 year ago

Not a big issue in any way, but hopefully worth noting.

Checking Herman's blog with Nu HTML Checker shows some errors like:

Error: Element style not allowed as child of element footer in this context. (Suppressing further errors from this subtree.)

or

Error: CSS: border-image: Parse Error.

or

Error: Attribute pubdate not allowed on element time at this point.

There are also a couple of info-messages, like

Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.

The error regarding X-Clacks-Overhead obviously can be ignored, as this seems to be intentional.

For bearblog.dev there is

Error: Bad value data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22>🐼 for attribute href on element link: Illegal character in scheme data: < is not allowed.

and

Error: CSS: Parse Error.

There are other errors in the validator report.

Just for completeness: The mentioned blogs show just fine on Firefox and Chromium. So errors in the validator do not necessarily lead to problems in actual browsers. But usually, for a new blog, you aim to be "validator-compliant".

Thanks for providing bearblog.dev.

HermanMartinus commented 1 year ago

Yeah, none of these cause any issues, but for brevity I've gone and sorted them all out. All the non-closing tags are up to HTML 5 standard, I've moved Clacks Overhead to middleware, and sorted out the rest of the info and warnings.

One issue is the <content> tag. I've made a note to replace this with <section> but will need to programatically update all users' custom styling just in-case they use <content> as a selector.