[chronojump] Removing backslash on username if sent to R



commit 0a77f12b7f705814fecb788fc80009c3f03f9afe
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Mar 2 18:51:11 2015 +0100

    Removing backslash on username if sent to R

 src/util.cs        |    8 ++++++++
 src/utilEncoder.cs |    2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/util.cs b/src/util.cs
index 9ae625a..bf49895 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -310,6 +310,14 @@ public class Util
                return myStringBuilder.ToString();
        }
 
+       //needed for encoder R files
+       public static string RemoveBackSlash(string myString)
+       {
+               StringBuilder myStringBuilder = new StringBuilder(myString);
+               myStringBuilder.Replace("\\", " ");
+               return myStringBuilder.ToString();
+       }
+
        public static string RemoveZeroOrMinus(string myString) 
        {
                if(myString == "0" || myString == "-")
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 88fd463..a38eded 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -364,6 +364,8 @@ public class UtilEncoder
                string scriptGraphR = GetEncoderScriptGraph();
                
                string operatingSystem = "Linux";
+                       
+               title = Util.RemoveBackSlash(title);
                
                if (UtilAll.IsWindows()) {
                        //convert accents to Unicode in order to be plotted correctly on R windows


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]