Escape strings for use as JavaScript string literals