Merge pull request #2000 from umputun/fix/quick-fixes-1946-1991-1996

Fix email encoding, image cleanup CPU spin, and demo template paths
This commit is contained in:
Umputun
2026-02-10 22:52:40 -06:00
committed by GitHub
3 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -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,
+6
View File
@@ -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)
+3 -3
View File
@@ -72,11 +72,11 @@
</p>
<div class="widgets">
<div class="widget widgets__widget widgets__comments-widget">
<a class="widget__link" href="/web/last-comments.html">Last comments widget page</a><br />
<iframe class="widget__frame widget__comments-frame" src="/web/last-comments.html" frameborder="0"></iframe>
<a class="widget__link" href="<%= htmlWebpackPlugin.options.REMARK_URL %>/web/last-comments.html">Last comments widget page</a><br />
<iframe class="widget__frame widget__comments-frame" src="<%= htmlWebpackPlugin.options.REMARK_URL %>/web/last-comments.html" frameborder="0"></iframe>
</div>
<div class="widget widgets__widget widgets__counter-widget">
<a class="widget__link" href="/web/counter.html">Counter widget page</a><br />
<a class="widget__link" href="<%= htmlWebpackPlugin.options.REMARK_URL %>/web/counter.html">Counter widget page</a><br />
<div class="widget__frame widget__counter-frame">Comments count: <span class="remark42__counter"></span></div>
</div>
</div>