added ircs support
Cette révision appartient à :
Parent
b3ade9f273
révision
665c6e3116
|
@ -124,7 +124,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error {
|
||||||
}
|
}
|
||||||
if f.WebsiteLink != "" {
|
if f.WebsiteLink != "" {
|
||||||
// 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) {
|
if !urlRegexp.MatchString(f.WebsiteLink) {
|
||||||
return ErrInvalidWebsiteLink
|
return ErrInvalidWebsiteLink
|
||||||
}
|
}
|
||||||
|
|
Référencer dans un nouveau ticket