diff --git a/src/main/java/org/jbei/ice/lib/bulkupload/BulkCSVUpload.java b/src/main/java/org/jbei/ice/lib/bulkupload/BulkCSVUpload.java index abd99009c..8f50b4d05 100644 --- a/src/main/java/org/jbei/ice/lib/bulkupload/BulkCSVUpload.java +++ b/src/main/java/org/jbei/ice/lib/bulkupload/BulkCSVUpload.java @@ -128,7 +128,7 @@ private HashMap processColumnHeaders(String[] headerArray) HashMap headers = new HashMap<>(); for (int i = 0; i < headerArray.length; i += 1) { - String fieldStr = headerArray[i].trim(); + String fieldStr = headerArray[i].replaceAll("[^\\x20-\\x7e]", " ").trim(); // account for asterisk that indicates a header is required fieldStr = fieldStr.replace(FileBulkUpload.ASTERISK_SYMBOL, ""); @@ -196,7 +196,7 @@ List getBulkUploadDataFromFile(InputStream inputStream) throws I // for each column for (int i = 0; i < nextLine.length; i += 1) { HeaderValue headerForColumn = headers.get(i); - String value = nextLine[i]; + String value = nextLine[i].replaceAll("[^\\x20-\\x7e]", " "); // process sample information if (headerForColumn.isSampleField()) {