(JAL-1023) ensure filename is properly escaped before embedding it in script
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 8 Dec 2011 11:44:11 +0000 (11:44 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 8 Dec 2011 11:44:11 +0000 (11:44 +0000)
src/jalview/gui/AppJmol.java

index 0e00de4..8d9d9f0 100644 (file)
@@ -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) + "\"");
           }
         }
       }