Project

General

Profile

Bug #10482

Wt creates invalid HTML/CSS

Added by Steven Köhler 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
06/12/2022
Due date:
% Done:

100%

Estimated time:

Description

I recently ran an HTML validity check and found some HTML/CSS errors which turned out to be caused by Wt:

I ran the test with one of my applications, but it can easily be reproduced with any application, like the Wt homepage: see https://validator.w3.org/nu/?doc=https%3A%2F%2Fwebtoolkit.eu. (The Wt homepage itself has some more issues, but those don't seem to be automatically generated HTML/CSS.)

  • The first two errors are caused because Wt does not recognize <link> and <meta> as self closing tags in DomElement::isSelfClosingTag.
  • The cursor: hand CSS error occurs on multiple occasions and is always preceded by cursor: pointer, and thus looks like the result of a failed find and replace operation to me.

I already fixed those errors and created a pull request for it: https://github.com/emweb/wt/pull/192. Although most browsers handle these errors pretty well, I think it is preferable to not have them in the first place.


Files

errors.png (51.6 KB) errors.png Steven Köhler, 06/12/2022 08:35 PM

Also available in: Atom PDF