From bdba3ff9a9f98c1605c01c0e84f6bd6ed5c3efae Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 13 Jul 2021 16:03:51 +0200 Subject: sanitize html for statuses + instance (#97) * sanitize html for statuses + instance * sanitization --- internal/processing/admin/createdomainblock.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/processing/admin') diff --git a/internal/processing/admin/createdomainblock.go b/internal/processing/admin/createdomainblock.go index a9c7094e6..78c830a43 100644 --- a/internal/processing/admin/createdomainblock.go +++ b/internal/processing/admin/createdomainblock.go @@ -28,6 +28,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/id" + "github.com/superseriousbusiness/gotosocial/internal/util" ) func (p *processor) DomainBlockCreate(account *gtsmodel.Account, domain string, obfuscate bool, publicComment string, privateComment string, subscriptionID string) (*apimodel.DomainBlock, gtserror.WithCode) { @@ -51,8 +52,8 @@ func (p *processor) DomainBlockCreate(account *gtsmodel.Account, domain string, ID: blockID, Domain: domain, CreatedByAccountID: account.ID, - PrivateComment: privateComment, - PublicComment: publicComment, + PrivateComment: util.RemoveHTML(privateComment), + PublicComment: util.RemoveHTML(publicComment), Obfuscate: obfuscate, SubscriptionID: subscriptionID, } -- cgit v1.2.3