Handle malformed html