From 95b5f6a90f6ff4187ce558d72471cd2147791fc1 Mon Sep 17 00:00:00 2001 From: Eugene Date: Sun, 24 Dec 2017 14:57:02 -0600 Subject: [PATCH] proper snaitizer for profile link --- app/store/store.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/store/store.go b/app/store/store.go index 51920c8f..f1f2e3ea 100644 --- a/app/store/store.go +++ b/app/store/store.go @@ -83,8 +83,10 @@ func sanitizeComment(comment Comment) Comment { comment.User.ID = template.HTMLEscapeString(comment.User.ID) comment.User.Name = template.HTMLEscapeString(comment.User.Name) comment.User.Picture = p.Sanitize(comment.User.Picture) - comment.User.Profile = template.HTMLEscapeString(comment.User.Profile) + comment.User.Profile = p.Sanitize(comment.User.Profile) + comment.Text = strings.Replace(comment.Text, "\n", "", -1) comment.Text = strings.Replace(comment.Text, "\t", "", -1) + return comment }