RequestFactory: refactoring of removing magic quotes