diff --git a/kb b/kb index 8f6d384..c1f3ac0 100755 --- a/kb +++ b/kb @@ -67,6 +67,13 @@ isInt() { return "$?" } +# Escapes ' and \ characters +safeSQL(){ + echo "$1" | + sed 's/\\/\\\\/g' | + sed "s/'/\\\'/g" +} + # Set Flags # ----------------------------------- @@ -124,12 +131,6 @@ makedb(){ echo "Still need to implement this" } -# Escapes ' and \ characters -safeSQL(){ - echo "$1" | - sed 's/\\/\\\\/g' | - sed "s/'/\\\'/g" -} # Makes file names safe escapeFilename(){