diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-07-28 11:14:16 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-07-28 11:14:16 -0400 |
commit | 2602f3b49edd92cc292a49cca26377f19f1ccf4b (patch) | |
tree | 2785d6eb37fa6eb039611d3ec6c43c998ba8ee8d /model/utils.go | |
parent | ec2e61bc55aa12c4157937ed6492e109ad3422ae (diff) | |
parent | 892fe2b7b6b801e31dd23d74be14d68c989a4d12 (diff) | |
download | chat-2602f3b49edd92cc292a49cca26377f19f1ccf4b.tar.gz chat-2602f3b49edd92cc292a49cca26377f19f1ccf4b.tar.bz2 chat-2602f3b49edd92cc292a49cca26377f19f1ccf4b.zip |
Merge pull request #255 from hmhealey/mm1682
MM-1682 Allow files without file extensions to be attached to messages
Diffstat (limited to 'model/utils.go')
-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..c7f991da2 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} |