diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index 54fa7b6b7e..0f8360231b 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -1,4 +1,4 @@ - /* +/* * * Autopsy Forensic Browser * @@ -719,8 +719,7 @@ class ReportHTML implements TableReportModule { */ public String saveContent(AbstractFile file, String dirName) { // clean up the dir name passed in - String dirName2 = dirName.replace("/", "_"); - dirName2 = dirName2.replace("\\", "_"); + String dirName2 = org.sleuthkit.autopsy.coreutils.FileUtil.escapeFileName(dirName); // Make a folder for the local file with the same tagName as the tag. StringBuilder localFilePath = new StringBuilder(); // full path @@ -840,13 +839,13 @@ class ReportHTML implements TableReportModule { StringBuilder index = new StringBuilder(); final String reportTitle = reportBranding.getReportTitle(); String iconPath = reportBranding.getAgencyLogoPath(); - if (iconPath == null){ + if (iconPath == null) { // use default Autopsy icon if custom icon is not set iconPath = "favicon.ico"; } index.append("\n").append(reportTitle).append(" ").append( NbBundle.getMessage(this.getClass(), "ReportHTML.writeIndex.title", currentCase.getName())).append( - "\n"); //NON-NLS + "\n"); //NON-NLS index.append("\n"); //NON-NLS index.append("\n"); //NON-NLS @@ -1045,10 +1044,10 @@ class ReportHTML implements TableReportModule { .append("").append(caseName).append("\n"); //NON-NLS NON-NLS summary.append("").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.caseNum")) //NON-NLS .append("").append(!caseNumber.isEmpty() ? caseNumber : NbBundle //NON-NLS - .getMessage(this.getClass(), "ReportHTML.writeSum.noCaseNum")).append("\n"); //NON-NLS + .getMessage(this.getClass(), "ReportHTML.writeSum.noCaseNum")).append("\n"); //NON-NLS summary.append("").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.examiner")).append("") //NON-NLS .append(!examiner.isEmpty() ? examiner : NbBundle - .getMessage(this.getClass(), "ReportHTML.writeSum.noExaminer")) + .getMessage(this.getClass(), "ReportHTML.writeSum.noExaminer")) .append("\n"); //NON-NLS summary.append("").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.numImages")) //NON-NLS .append("").append(imagecount).append("\n"); //NON-NLS