(content string, index int, itemType string)
| 41 | } |
| 42 | |
| 43 | func checkDangerousContent(content string, index int, itemType string) error { |
| 44 | lower := strings.ToLower(content) |
| 45 | for _, d := range dangerousChars { |
| 46 | if strings.Contains(lower, d) { |
| 47 | return fmt.Errorf("第%d个%s包含不允许的内容", index, itemType) |
| 48 | } |
| 49 | } |
| 50 | return nil |
| 51 | } |
| 52 | |
| 53 | func getJSONList(jsonStr string) []map[string]interface{} { |
| 54 | if jsonStr == "" { |
no test coverage detected