Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

added ircs support

Cette révision appartient à :
akuma06 2017-05-20 18:40:20 +02:00 révisé par GitHub
Parent b3ade9f273
révision 665c6e3116

Voir le fichier

@ -124,7 +124,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error {
}
if f.WebsiteLink != "" {
// WebsiteLink
urlRegexp, _ := regexp.Compile(`^(https?:\/\/|irc:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$`)
urlRegexp, _ := regexp.Compile(`^(https?:\/\/|ircs?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$`)
if !urlRegexp.MatchString(f.WebsiteLink) {
return ErrInvalidWebsiteLink
}