Extract check for HTML into module