mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 10:17:28 -06:00
rename some of the text functions for clarity
This commit is contained in:
parent
a05d4bac53
commit
c8556cfd97
16 changed files with 145 additions and 124 deletions
|
|
@ -67,7 +67,7 @@ func OGBase(instance *apimodel.InstanceV1) *OGMeta {
|
|||
}
|
||||
|
||||
og := &OGMeta{
|
||||
Title: text.RemoveHTML(instance.Title) + " - GoToSocial",
|
||||
Title: text.StripHTMLFromText(instance.Title) + " - GoToSocial",
|
||||
Type: "website",
|
||||
Locale: locale,
|
||||
URL: instance.URI,
|
||||
|
|
@ -161,7 +161,7 @@ func AccountTitle(account *apimodel.WebAccount, 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.RemoveHTML(in)
|
||||
i := text.StripHTMLFromText(in)
|
||||
i = strings.ReplaceAll(i, "\n", " ")
|
||||
i = strings.Join(strings.Fields(i), " ")
|
||||
i = html.EscapeString(i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue