seekia/internal/allowedText/allowedText.go

21 lines
419 B
Go

// allowedText provides a function to check if a user-supplied text is UTF-8 encoded
// All profile and message text must be utf-8
package allowedText
// TODO: We may want to add other unicode characters to restrict for future profile versions
import "unicode/utf8"
func VerifyStringIsAllowed(input string)bool{
isAllowed := utf8.ValidString(input)
if (isAllowed == false){
return false
}
return true
}