diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-27 12:34:36 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-28 10:07:10 -0400 |
commit | fbb2477643f4043ef2b5827cd14402b9cdeb7241 (patch) | |
tree | 7b8794741093ba741ad88acdc038d9b5c31da85c /model | |
parent | ec2e61bc55aa12c4157937ed6492e109ad3422ae (diff) | |
download | chat-fbb2477643f4043ef2b5827cd14402b9cdeb7241.tar.gz chat-fbb2477643f4043ef2b5827cd14402b9cdeb7241.tar.bz2 chat-fbb2477643f4043ef2b5827cd14402b9cdeb7241.zip |
Allow files without extensions to be uploaded as attachments to posts
Diffstat (limited to 'model')
-rw-r--r-- | model/utils.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/model/utils.go b/model/utils.go index 093a54e38..4c698be2a 100644 --- a/model/utils.go +++ b/model/utils.go @@ -319,6 +319,6 @@ func ClearMentionTags(post string) string { } var UrlRegex = regexp.MustCompile(`^((?:[a-z]+:\/\/)?(?:(?:[a-z0-9\-]+\.)+(?:[a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|local|internal))(:[0-9]{1,5})?(?:\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(?:\?[a-z0-9+_~\-\.%=&]*)?)?(?:#[a-zA-Z0-9!$&'()*+.=-_~:@/?]*)?)(?:\s+|$)$`) -var PartialUrlRegex = regexp.MustCompile(`/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/((?:[A-Za-z0-9]{26})?.+\.[A-Za-z0-9]{3,})`) +var PartialUrlRegex = regexp.MustCompile(`/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/((?:[A-Za-z0-9]{26})?.+(\.[A-Za-z0-9]{3,})?)`) var SplitRunes = map[rune]bool{',': true, ' ': true, '.': true, '!': true, '?': true, ':': true, ';': true, '\n': true, '<': true, '>': true, '(': true, ')': true, '{': true, '}': true, '[': true, ']': true, '+': true, '/': true, '\\': true} |