Security Fix. Correctly scrub arrays for XSS protection.