Blame view

string_sanitisation.go 267 Bytes
ea858b8a7   Marko Tikvić   refactoring
1
  package webutility
5f1346d2d   Marko Tikvić   SQLProtect replac...
2

f74a6c349   Marko Tikvić   refactored
3
  import "git.to-net.rs/marko.tikvic/util"
5f1346d2d   Marko Tikvić   SQLProtect replac...
4

707782344   Marko Tikvić   lint; vet
5
  const patern = "\"';&*<>=\\`:"
ea858b8a7   Marko Tikvić   refactoring
6

707782344   Marko Tikvić   lint; vet
7
  // SanitiseString removes characters from s found in patern and returns new modified string.
f74a6c349   Marko Tikvić   refactored
8
9
  func SanitiseString(s string) string {
  	return util.ReplaceAny(s, patern, "")
5f1346d2d   Marko Tikvić   SQLProtect replac...
10
  }