add: image proxy

add: mentions in posts
TODO: audit log, reports, user mod panel
This commit is contained in:
trisua 2025-04-01 13:26:33 -04:00
parent e183a01887
commit 3a8af17154
14 changed files with 308 additions and 33 deletions

View file

@ -34,10 +34,7 @@ pub fn render_markdown(input: &str) -> String {
.generic_attributes(allowed_attributes)
.clean(&html)
.to_string()
.replace(
"src=\"",
"loading=\"lazy\" src=\"/api/v1/util/ext/image?img=",
)
.replace("src=\"", "loading=\"lazy\" src=\"/api/v1/util/proxy?url=")
.replace("--&gt;", "<align class=\"right\">")
.replace("-&gt;", "<align class=\"center\">")
.replace("&lt;-", "</align>")