fulldecent / github-pages-template

An opinionated starting point and build system for awesome, collaboratively-edited HTML websites
https://fulldecent.github.io/github-pages-template/
35 stars 52 forks source link

Add a sniff for <title> which contains HTML escape codes #110

Open fulldecent opened 3 days ago

fulldecent commented 3 days ago

A new test for built HTML files:

The title element has text. And that text must not contain:

&amp;amp;

and other obvious HTML encoding mistakes.

I guess the matcher could be:

m/\&amp;[a-z]+;/i
fulldecent commented 3 days ago

Here is one such found error (that was not on a <title>):

➜  public-websites egrep -i '\&amp;[a-z]+;' *-sites/*.*/build/**/*.html
atc-sites/rnmobility.com/build/hawaiice.html:    Hawai&amp;apos;i: RN license renewal &amp; continuing ed