(input string, isStrict bool)
| 82 | } |
| 83 | |
| 84 | func detectXSSOne(input string, isStrict bool) bool { |
| 85 | if len(input) == 0 { |
| 86 | return false |
| 87 | } |
| 88 | |
| 89 | var cInput = C.CString(input) |
| 90 | defer C.free(unsafe.Pointer(cInput)) |
| 91 | |
| 92 | var isStrictInt = 0 |
| 93 | if isStrict { |
| 94 | isStrictInt = 1 |
| 95 | } |
| 96 | return C.libinjection_xss(cInput, C.size_t(len(input)), C.int(isStrictInt)) == 1 |
| 97 | } |