diff --git a/api/src/org/labkey/api/qc/TsvDataSerializer.java b/api/src/org/labkey/api/qc/TsvDataSerializer.java index 101705f69ca..88e3934861f 100644 --- a/api/src/org/labkey/api/qc/TsvDataSerializer.java +++ b/api/src/org/labkey/api/qc/TsvDataSerializer.java @@ -122,7 +122,14 @@ else if (Collection.class.isAssignableFrom(o.getClass())) else if (Object[].class.isAssignableFrom(o.getClass())) pw.append(StringUtils.join((Object[]) o, ",")); else - pw.append(String.valueOf(o)); + { + String val = String.valueOf(o); + // double quote the value if it contains backslashes to avoid tab loader mangling + // on import + if (val.contains("\\")) + val = "\"" + val + "\""; + pw.append(val); + } } sep = "\t"; }