Replace unsafe chars.