SNOW-3718302: Correctly escape special characters in AI function object literals (#4270)