jhy/jsoup — Issue #138: Unwrapped inline content fails strict html/xhtml validation
Author: helsom
Created: 2011-11-10 12:40:09+00:00
State: open

As I understand it, from using the http://validator.w3.org/ validator for html 4.01 strict and xhtml 1.1 strict doctypes, inline content needs to be enclosed within a block element. So, for example, body contents of '

Body text

' would be valid whereas 'Body text' would not, due to the missing P tags. Likewise, inline elements such as span, em, a, etc need to be correctly wrapped by a block element (P) tag. Jsoup does not seem to ensure that inline content is correctly wrapped - should it?