better handling of javascript array / special characters