summaryrefslogtreecommitdiffstats
path: root/model/utils.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-04-28 10:13:07 -0400
committerChristopher Speller <crspeller@gmail.com>2017-04-28 10:13:07 -0400
commitc3e17da8c8ebd101d43ea9185821c44b651535b1 (patch)
tree48888cd816faa1beb6c822cc60c095bc6e6b232c /model/utils.go
parent83bfd95f65f5e74402f7146feecb68b37dd0bf84 (diff)
downloadchat-c3e17da8c8ebd101d43ea9185821c44b651535b1.tar.gz
chat-c3e17da8c8ebd101d43ea9185821c44b651535b1.tar.bz2
chat-c3e17da8c8ebd101d43ea9185821c44b651535b1.zip
PLT-6271 Changed word splitting to initially split on any non-name character (#6261)
* PLT-6271 Changed word splitting to initially split on any non-name character * Fixed detection of out of channel mentions
Diffstat (limited to 'model/utils.go')
-rw-r--r--model/utils.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/model/utils.go b/model/utils.go
index cddf38166..d24540683 100644
--- a/model/utils.go
+++ b/model/utils.go
@@ -401,8 +401,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 SplitRunes = map[rune]bool{',': true, ' ': true, '.': true, '!': true, '?': true, ':': true, ';': true, '\n': true, '<': true, '>': true, '(': true, ')': true, '{': true, '}': true, '[': true, ']': true, '+': true, '/': true, '\\': true, '^': true, '#': true, '$': true, '&': true}
-
func IsValidHttpUrl(rawUrl string) bool {
if strings.Index(rawUrl, "http://") != 0 && strings.Index(rawUrl, "https://") != 0 {
return false