From 8efc784c146ac768f3f8ca78a3da09440ff742ba Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 8 Dec 2011 11:44:11 +0000 Subject: [PATCH] (JAL-1023) ensure filename is properly escaped before embedding it in script --- src/jalview/gui/AppJmol.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 0e00de4..8d9d9f0 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -724,7 +724,8 @@ public class AppJmol extends GStructureViewer implements Runnable, // PDBEntry jmb.pdbentry[pi].setFile(file = ((PDBEntry) pdbseq .getSequenceAt(0).getPDBId().elementAt(0)).getFile()); - files.append(" \"" + file + "\""); + + files.append(" \"" + jalview.util.Platform.escapeString(file) + "\""); } else { @@ -747,7 +748,7 @@ public class AppJmol extends GStructureViewer implements Runnable, } if (file != null) { - files.append(" \"" + file + "\""); + files.append(" \"" + jalview.util.Platform.escapeString(file) + "\""); } } } -- 1.7.10.2