Blame view

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

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

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