sql_sequrity.go
305 Bytes
package webutility
import "strings"
var patern string = "\"';&*<>=\\`:"
// SQLSafeString removes characters from s found in patern and returns new modified string.
func SQLSafeString(s string) (safe string) {
for _, c := range patern {
safe = strings.Replace(s, string(c), "", -1)
}
return safe
}