mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)
This commit is contained in:
@ -67,7 +67,7 @@ func ogBase(instance *apimodel.InstanceV1) *ogMeta {
|
||||
}
|
||||
|
||||
og := &ogMeta{
|
||||
Title: text.SanitizePlaintext(instance.Title) + " - GoToSocial",
|
||||
Title: text.SanitizeToPlaintext(instance.Title) + " - GoToSocial",
|
||||
Type: "website",
|
||||
Locale: locale,
|
||||
URL: instance.URI,
|
||||
@ -156,7 +156,7 @@ func parseTitle(account *apimodel.Account, accountDomain string) string {
|
||||
// parseDescription returns a string description which is
|
||||
// safe to use as a template.HTMLAttr inside templates.
|
||||
func parseDescription(in string) string {
|
||||
i := text.SanitizePlaintext(in)
|
||||
i := text.SanitizeToPlaintext(in)
|
||||
i = strings.ReplaceAll(i, "\n", " ")
|
||||
i = strings.Join(strings.Fields(i), " ")
|
||||
i = html.EscapeString(i)
|
||||
|
Reference in New Issue
Block a user