This should also be safe on any html file that isn't an angular template (cherry picked from commit 9d1d742f1b)
9d1d742f1b
PR Close #30962