Fix HTML escaping

This commit is contained in:
r 2021-04-23 10:19:09 +00:00
parent bd74cb50e7
commit 469f2d1d25
5 changed files with 10 additions and 13 deletions

View file

@ -3,7 +3,6 @@ package service
import (
"errors"
"fmt"
"html/template"
"mime/multipart"
"net/url"
"strings"
@ -560,16 +559,15 @@ func (s *service) UserSearchPage(c *client,
url.QueryEscape(q), offset)
}
qq := template.HTMLEscapeString(q)
if len(q) > 0 {
title += " \"" + qq + "\""
title += " \"" + q + "\""
}
cdata := s.cdata(c, title, 0, 0, "")
data := &renderer.UserSearchData{
CommonData: cdata,
User: user,
Q: qq,
Q: q,
Statuses: results.Statuses,
NextLink: nextLink,
}
@ -620,15 +618,14 @@ func (s *service) SearchPage(c *client,
url.QueryEscape(q), qType, offset)
}
qq := template.HTMLEscapeString(q)
if len(q) > 0 {
title += " \"" + qq + "\""
title += " \"" + q + "\""
}
cdata := s.cdata(c, title, 0, 0, "")
data := &renderer.SearchData{
CommonData: cdata,
Q: qq,
Q: q,
Type: qType,
Users: results.Accounts,
Statuses: results.Statuses,