support non-strict html5 valid mode