WhileListType.RELAXED still allows <div> tags. It was a documentation error that it was not listed in the docs. Khalid Alqinyah describes the proper solution, if <div> has to be considered invalid.