I noticed that other tags were also getting added at the incorrect levels so I expanded on my previous code. var invalidTagsSelector = "> font, > strong, > em, ul > font, ul > strong, ul > em, li > font, li > strong, li > em"; var invalidTagsInTopLeve