1
0
Fork 0
forgejo/modules
wxiaoguang 68099f2f00
Refactor some Str2html code (#29397)
This PR touches the most interesting part of the "template refactoring".

1. Unclear variable type. Especially for "web/feed/convert.go":
sometimes it uses text, sometimes it uses HTML.
2. Assign text content to "RenderedContent" field, for example: `
project.RenderedContent = project.Description` in web/org/projects.go
3. Assign rendered content to text field, for example: `r.Note =
rendered content` in web/repo/release.go
4. (possible) Incorrectly calling `{{Str2html
.PackageDescriptor.Metadata.ReleaseNotes}}` in
package/content/nuget.tmpl, I guess the name Str2html misleads
developers to use it to "render string to html", but it only sanitizes.
if ReleaseNotes really contains HTML, then this is not a problem.

(cherry picked from commit e71eb8930a5d0f60874b038c223498b41ad65592)

Conflicts:
	modules/templates/util_string.go
	trivial context conflict
2024-03-06 12:10:44 +08:00
..
actions Fix workflow trigger event bugs (#29467) 2024-03-06 12:10:44 +08:00
activitypub
analyze
assetfs
auth Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
avatar
base [FEAT] Show follow symlink button 2024-03-02 17:58:09 +01:00
cache
charset [FEAT] Enable ambiguous character detection in configured contexts 2024-02-23 13:12:17 +01:00
container
csv Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
emoji
eventsource
generate Port "Use general token signing secret" 2024-02-19 20:49:37 +01:00
git [FEAT] Show follow symlink button 2024-03-02 17:58:09 +01:00
gitgraph
gitrepo
graceful
hcaptcha
highlight
hostmatcher
html
httpcache
httplib
indexer migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
issue/template
json
label
lfs
log
markup Refactor some Str2html code (#29397) 2024-03-06 12:10:44 +08:00
mcaptcha
metrics
migration Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
nosql
optional migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
options
packages
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references Allow 's in mentions 2024-02-27 18:26:59 +00:00
regexplru
repository Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
secret
session
setting Merge pull request 'Disabling Stars should disable the routes too' (#2471) from algernon/forgejo:stars/disable-routes into forgejo 2024-02-27 21:24:25 +00:00
sitemap
ssh
storage
structs Allow instance-wide disabling of forking 2024-02-25 12:00:17 +01:00
svg
sync
system
templates Refactor some Str2html code (#29397) 2024-03-06 12:10:44 +08:00
test
testlogger
timeutil Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
translation Improve TrHTML and add more tests (#29228) 2024-02-19 22:58:33 +01:00
turnstile
typesniffer
updatechecker
uri
user
util migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
validation
web Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
webhook