aboutsummaryrefslogtreecommitdiff
path: root/client.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 /client.go
parentbef846b77490b6f4eb06dcec70aa684490ea0fd7 (diff)
regex escape hyphens in regex for quote and replies
Diffstat (limited to 'client.go')
-rw-r--r--client.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/client.go b/client.go
index 5d824bf..f47ca52 100644
--- a/client.go
+++ b/client.go
@@ -10,7 +10,6 @@ import (
"sort"
"regexp"
"time"
- "fmt"
)
var Key *string = new(string)
@@ -635,7 +634,6 @@ func MediaProxy(url string) string {
return url
}
- fmt.Println("")
MediaHashs[HashMedia(url)] = url
return "/api/media?hash=" + HashMedia(url)
}
@@ -643,7 +641,7 @@ func MediaProxy(url string) string {
func ParseContent(db *sql.DB, board Actor, op string, content string, thread ObjectBase) template.HTML {
var nContent = content
- re := regexp.MustCompile(`(>>https?:\/\/[A-Za-z0-9_.-~]+\/[A-Za-z0-9_.-~]+\/\w+)`)
+ re := regexp.MustCompile(`(>>https?://[A-Za-z0-9_.\-~]+\/[A-Za-z0-9_.\-~]+\/\w+)`)
match := re.FindAllStringSubmatch(nContent, -1)
//add url to each matched reply