Moves safeSQL function to utils

master
Jonathan Hodgson 4 years ago
parent b84cf93f4a
commit 660c739c18
  1. 13
      kb

13
kb

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

Loading…
Cancel
Save