[PATCH] D34581: Fix missing/mismatched html tags

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 21:43:49 PDT 2017


MatzeB added a comment.

In https://reviews.llvm.org/D34581#790630, @kristof.beyls wrote:

> In https://reviews.llvm.org/D34581#790607, @cmatthews wrote:
>
> > It would be wonderful if we could programmatically check these during testing. Thanks Matthias!
>
>
> I had to make the tags XML-compliant in the daily report page to make testing its content in tests/server/ui/V4Pages.py possible using the Python built-in xml parser (see functions check_nr_machines_reported and get_xml_tree).
>  So, in other words, I think checking this programmatically would probably be easy and boil down to parsing every HTML page using the Python built-in xml parser, see function get_xml_tree pointed to in the sentence above.


Adding the tests would be easy (you could easy tweak the V4Pages script to not just check the presence of pages but also the well-formedness). Unforunately I had to give up the approach of validating XML for now:
The flask WTForms stuff only outputs HTML5 and has no option (at least nothing without a lot of hackery accessible according to my websearches) that outputs XHTML, so it produces <input> elements that aren't properly closed according to xml rules.


Repository:
  rL LLVM

https://reviews.llvm.org/D34581





More information about the llvm-commits mailing list