handle special keys by escaping $ in the value