summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-07-28 10:10:44 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-07-28 10:10:44 -0400
commit892fe2b7b6b801e31dd23d74be14d68c989a4d12 (patch)
tree2785d6eb37fa6eb039611d3ec6c43c998ba8ee8d /model
parent1842868410ff13b46053f363eb22595faf9d2e7c (diff)
downloadchat-892fe2b7b6b801e31dd23d74be14d68c989a4d12.tar.gz
chat-892fe2b7b6b801e31dd23d74be14d68c989a4d12.tar.bz2
chat-892fe2b7b6b801e31dd23d74be14d68c989a4d12.zip
Added non-capturing group to regex used for matching local file urls
Diffstat (limited to 'model')
-rw-r--r--model/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/model/utils.go b/model/utils.go
index 4c698be2a..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+_~\-\.%=&amp;]*)?)?(?:#[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}