Strip out all comments before attempting to process the HTML (to avoid malformed scripts).