summaryrefslogtreecommitdiff
path: root/internal/web/opengraph.go
AgeCommit message (Collapse)AuthorFiles
2023-12-27[chore] Refactor HTML templates and CSS (#2480)Libravatar tobi1
* [chore] Refactor HTML templates and CSS * eslint * ignore "Local" * rss tests * fiddle with OG just a tiny bit * dick around with polls a bit more so SR stops saying "clickable" * remove break * oh lord * don't lazy load avatar * fix ogmeta tests * clean up some cruft * catch remaining calls to c.HTML * fix error rendering + stack overflow in tag * allow templating attributes * fix indent * set aria-hidden on status complementary content, since it's already present in the label anyway * tidy up templating calls a little * try to make styling a bit more consistent + readable * fix up some remaining CSS issues * fix up reports
2023-11-10[feature] Media attachment placeholders (#2331)Libravatar tobi1
* [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup
2023-08-11[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)Libravatar tobi1
2023-05-03[bugfix] Fix invalid og:description on account w/ empty note (#1733)Libravatar tobi1
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney1
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-03-12[chore] Fix opengraph properties (#1611)Libravatar tobi1
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
2023-02-02[feature] Implement `/api/v2/instance` endpoint (#1409)Libravatar tobi1
* interim: start adding /api/v2/instance * finish up
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi1
2022-12-15[bugfix] Use null for empty api status `language` (#1268)Libravatar tobi1
* [bugfix] Use null for empty api status `language` * update swagger docs
2022-09-07[feature] opengraph meta tags (#806)Libravatar f0x521
* f0x gitignore additions * better meta title and descriptions * user avatar icon for thread and profile meta tags * use proper tag for image * whitespace * add noescapeAttr template function * use ogMeta struct for opengraph * maxOGDescriptionLength = 300 Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>