4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-03 22:27:44 +00:00

Update shazow/ssh-chat dependency (#947)

This commit is contained in:
Wim
2019-11-17 21:42:41 +01:00
committed by GitHub
parent 0917dc8766
commit d4253d7a55
17 changed files with 1518 additions and 16 deletions

View File

@ -2,7 +2,10 @@ package sanitize
import "regexp"
var reStripName = regexp.MustCompile("[^\\w.-]")
var (
reStripName = regexp.MustCompile("[^\\w.-]")
reStripData = regexp.MustCompile("[^[:ascii:]]|[[:cntrl:]]")
)
const maxLength = 16
@ -17,8 +20,6 @@ func Name(s string) string {
return s
}
var reStripData = regexp.MustCompile("[^[:ascii:]]|[[:cntrl:]]")
// Data returns a string with only allowed characters for client-provided metadata inputs.
func Data(s string, maxlen int) string {
if len(s) > maxlen {