Backslashes are correctly escaped with another backslash
authorarjen <arjen>
Mon, 27 Oct 2003 11:26:43 +0000 (11:26 +0000)
committerarjen <arjen>
Mon, 27 Oct 2003 11:26:43 +0000 (11:26 +0000)
src/gcm_input/string_utils.cpp

index 56010a1..f23daea 100644 (file)
@@ -8,7 +8,7 @@
 ***********************
 **      FILE NAME      : string_utils.cpp
 **      SYSTEM NAME    : Gnucomo - Gnu Computer Monitoring
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  Utility functions for Strings
 **
 
 /*****************************
    $Log: string_utils.cpp,v $
-   Revision 1.1  2003-08-05 08:15:01  arjen
+   Revision 1.2  2003-10-27 11:26:43  arjen
+   Backslashes are correctly escaped with another backslash
+
+   Revision 1.1  2003/08/05 08:15:01  arjen
    Debug output to the log stream instead of cerr.
    Fixed namespace problems in XPath searches of the DOM.
    Moved string utility functions to a separate file.
 
 *****************************/
 
-static const char *RCSID = "$Id: string_utils.cpp,v 1.1 2003-08-05 08:15:01 arjen Exp $";
+static const char *RCSID = "$Id: string_utils.cpp,v 1.2 2003-10-27 11:26:43 arjen Exp $";
 
 #include <AXE/String.h>
 
@@ -59,7 +62,7 @@ String SQL_Escape(String s)
 
    for (i = 0; i < ~s; i++)
    {
-      if (s[i] == '\'')
+      if (s[i] == '\'' || s[i] == '\\')
       {
          s(i,0) = "\\";
          i++;