]> source.dussan.org Git - gitea.git/commit
Refactor `og:description` to limit the max length (#26876)
authorwxiaoguang <wxiaoguang@gmail.com>
Sun, 3 Sep 2023 01:43:29 +0000 (09:43 +0800)
committerGitHub <noreply@github.com>
Sun, 3 Sep 2023 01:43:29 +0000 (01:43 +0000)
commitc802c46a9beeaed44d41f50de31a4db146cdd8f7
tree9492798f81da6949f23e4d1f79ed8528f226dac3
parent9a3de436f452144933888fb1e4f336efeb93293a
Refactor `og:description` to limit the max length (#26876)

1. The `og:description` should be "a one to two sentence description of
your object"
* It shouldn't output all the user inputted content -- it would be
pretty huge.
    * Maybe it only needs at most 300 bytes.
2. Do not render commit message as HTML
modules/templates/util_string.go
templates/base/head_opengraph.tmpl