I'm keeping this Hash functionality which was introduced in the last update to this file, but it looks to me like this will double escape quotes that are in the hash.  Not sure if this when clause is ever even used.