SafeOneLine will tell if a character in the string is considered unsafe Currently trigger on all unicode control character
(s string)
| 36 | // SafeOneLine will tell if a character in the string is considered unsafe |
| 37 | // Currently trigger on all unicode control character |
| 38 | func SafeOneLine(s string) bool { |
| 39 | for _, r := range s { |
| 40 | if unicode.IsControl(r) { |
| 41 | return false |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | return true |
| 46 | } |
| 47 | |
| 48 | // ValidUrl will tell if the string contains what seems to be a valid URL |
| 49 | func ValidUrl(s string) bool { |