ECMS-4304 [SANITZATION] refactor manage view function