escaping a string for js; refs #19