Strip illegal symbols from database envs