diff --git a/backend/app/notify/email.go b/backend/app/notify/email.go index f72c6b56d6..6238e09f68 100644 --- a/backend/app/notify/email.go +++ b/backend/app/notify/email.go @@ -168,7 +168,7 @@ func (e *Email) buildAndSendMessage(ctx context.Context, req Request, email stri ctx, fmt.Sprintf("mailto:%s?from=%s&unsubscribeLink=%s&subject=%s", email, - e.From, + url.QueryEscape(e.From), url.QueryEscape(msg.unsubscribeLink), url.QueryEscape(msg.subject), ), @@ -203,7 +203,7 @@ func (e *Email) SendVerification(ctx context.Context, req VerificationRequest) e ctx, fmt.Sprintf("mailto:%s?from=%s&subject=%s", req.Email, - e.From, + url.QueryEscape(e.From), url.QueryEscape(e.VerificationSubject), ), msg, diff --git a/backend/app/store/image/image.go b/backend/app/store/image/image.go index 6339d8e156..2bfea93b0d 100644 --- a/backend/app/store/image/image.go +++ b/backend/app/store/image/image.go @@ -154,6 +154,12 @@ func (s *Service) ExtractNonProxiedPictures(commentHTML string) (ids []string) { // Cleanup runs periodic cleanup with 1.5*ServiceParams.EditDuration. Blocking loop, should be called inside of goroutine by consumer func (s *Service) Cleanup(ctx context.Context) { + if s.EditDuration <= 0 { + log.Printf("[INFO] pictures cleanup disabled, edit duration is %v", s.EditDuration) + <-ctx.Done() + return + } + cleanupTTL := s.EditDuration * 15 / 10 // cleanup images older than 1.5 * EditDuration log.Printf("[INFO] start pictures cleanup, staging ttl=%v", cleanupTTL) diff --git a/frontend/apps/remark42/templates/demo.ejs b/frontend/apps/remark42/templates/demo.ejs index 09d43709ad..2c3f8730c7 100644 --- a/frontend/apps/remark42/templates/demo.ejs +++ b/frontend/apps/remark42/templates/demo.ejs @@ -72,11 +72,11 @@
- + Last comments widget page
+