ECMS-4304 [SANITIZATION] refactor manage view function