aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-22 16:08:51 -0700
committerFChannel <>2021-07-22 16:08:51 -0700
commit213683bf7245a05aa734ac2bb26fba60705ba5ee (patch)
treef0dd36d0274c274d996c8fc56726fdc49caeeec7 /main.go
parentbef846b77490b6f4eb06dcec70aa684490ea0fd7 (diff)
regex escape hyphens in regex for quote and replies
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 60f537f..9ef9873 100644
--- a/main.go
+++ b/main.go
@@ -1649,7 +1649,7 @@ func CreateAttachmentObject(file multipart.File, header *multipart.FileHeader) (
func ParseCommentForReplies(comment string) []ObjectBase {
- re := regexp.MustCompile(`(>>https?:\/\/[A-z.:0-9]+\/[A-z0-9]+\/\w+)`)
+ re := regexp.MustCompile(`(>>https?://[A-Za-z0-9_.\-~]+\/[A-Za-z0-9_.\-~]+\/\w+)`)
match := re.FindAllStringSubmatch(comment, -1)
var links []string