When HTML contains CDATA or comments the display is wrong. Reason is that in this case the ">" is handled twice. Following patch solves the issues.