Commit 5f1346d2d744cd378fb74903cdef1fbb290605dd

Authored by Marko Tikvić
1 parent 812040e296
Exists in master and in 1 other branch v2

SQLProtect replaces fishy characters with blanks

Showing 1 changed file with 13 additions and 0 deletions   Show diff stats
... ... @@ -0,0 +1,13 @@
  1 +package restutility
  2 +
  3 +import (
  4 + "strings"
  5 +)
  6 +
  7 +func SQLProtect(in string) string {
  8 + patern := "\"';&*<>=\\`:"
  9 + for _, c := range patern {
  10 + in = strings.Replace(in, string(c), "", -1)
  11 + }
  12 + return in
  13 +}
... ...