summaryrefslogtreecommitdiff
path: root/internal/web/opengraph_test.go
AgeCommit message (Collapse)AuthorFiles
2023-02-22[chore] improve opengraph descripiton tag (#1550)Libravatar Daenney1
This changes parseDescription to properly encode things to be safe for usage without removing things like backslashes that may be relevant. * text.SanitizePlaintext already calls html.UnescapeString so we don't have to do that * Replace \n with space early * Remove duplicate white-space by splitting on fields and joining * HTML-escape the string we have * For extra certainty, encode the backslash as \ Fixes #1549