all repos — navani @ 394e3cf44fa0b3ba70b74595dc6bf877c9d0b767

forlater's primary mail processing service

Don't strip URL params
Anirudh Oppiliappan x@icyphox.sh
Mon, 27 Sep 2021 22:40:51 +0530
commit

394e3cf44fa0b3ba70b74595dc6bf877c9d0b767

parent

3d8e721aa152691f68eeeb75ae9bd23dab55b1ba

1 files changed, 1 insertions(+), 8 deletions(-)

jump to
M mail/template.gomail/template.go

@@ -3,17 +3,10 @@

import ( "bytes" "html/template" - "net/url" "path/filepath" "git.icyphox.sh/forlater/navani/reader" ) - -func stripQueryParams(u *url.URL) string { - u.RawQuery = "" - u.Fragment = "" - return u.String() -} func RenderTemplate(file string, article *reader.Article) ([]byte, error) { t, err := template.ParseGlob(filepath.Join("templates", "*.tpl"))

@@ -31,7 +24,7 @@ }{

template.HTML(article.Content), article.Title, article.Byline, - stripQueryParams(article.URL), + article.URL.String(), }); err != nil { return nil, err }