Blame view
sql_sequrity.go
205 Bytes
ea858b8a7 refactoring |
1 |
package webutility |
5f1346d2d SQLProtect replac... |
2 3 4 5 |
import ( "strings" ) |
ea858b8a7 refactoring |
6 7 8 |
var patern string = "\"';&*<>=\\`:" func SQLSafeString(s string) string { |
5f1346d2d SQLProtect replac... |
9 |
for _, c := range patern { |
ea858b8a7 refactoring |
10 |
s = strings.Replace(s, string(c), "", -1) |
5f1346d2d SQLProtect replac... |
11 |
} |
ea858b8a7 refactoring |
12 |
return s |
5f1346d2d SQLProtect replac... |
13 |
} |