Use Echo.Utils.sanitize method defined in JS SDK