code: func sanitizeString(str string, maxLength uint) string {
  	const safeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY" +
  		"Z01234567890 .,;_/:?@"
  
  	// Strip any characters not in the safeChars string removed.
  	str = strings.Map(func(r rune) rune {
  		if strings.ContainsRune(safeChars, r) {
  			return r
  		}
  		return -1
  	}, str)
  
  	// Limit the string to the max allowed length.
  	if maxLength > 0 && uint(len(str)) > maxLength {
  		str = str[:maxLength]
  		str = str + "..."
  	}
  	return str
  }
docs: // sanitizeString strips any characters which are even remotely dangerous, such
  // as html control characters, from the passed string.  It also limits it to
  // the passed maximum size, which can be 0 for unlimited.  When the string is
  // limited, it will also add "..." to the string to indicate it was truncated.