fix escaping for values containing double quotes