aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-22 13:50:11 -0700
committerFChannel <>2021-07-22 13:50:11 -0700
commit3b2c8a4c78ade9e819b61aa055039ae00e517a3e (patch)
tree1d52c2c44cf89d6aa53b7ff2fd1e034553e2157a /main.go
parent5592a8c898b45e1e97d91b2c0bb0ed21750a9959 (diff)
fixed quote bug and moved comment parsing server side without javascript
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 4327e44..601394f 100644
--- a/main.go
+++ b/main.go
@@ -1640,8 +1640,8 @@ func CreateAttachmentObject(file multipart.File, header *multipart.FileHeader) (
}
func ParseCommentForReplies(comment string) []ObjectBase {
-
- re := regexp.MustCompile("(>>)(https://|http://)?(www\\.)?.+\\/\\w+")
+
+ re := regexp.MustCompile(`(>>https?:\/\/[A-z.:0-9]+\/[A-z0-9]+\/\w+)`)
match := re.FindAllStringSubmatch(comment, -1)
var links []string