From 67907a3629cd290f368d5b259c30c247e1c7d66d Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Sun, 19 Aug 2012 16:59:10 +0200 Subject: [PATCH] Parse html especial char con description --- upload/upload.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upload/upload.go b/upload/upload.go index 8224206..4139fe1 100644 --- a/upload/upload.go +++ b/upload/upload.go @@ -130,6 +130,10 @@ func parseDescription(description []string) string { str := cleanStr(strings.Join(description, ", ")) exp, _ := regexp.Compile("<[^>]*>") str = exp.ReplaceAllString(str, "") + str = strings.Replace(str, "&", "&", -1) + str = strings.Replace(str, "<", "<", -1) + str = strings.Replace(str, ">", ">", -1) + str = strings.Replace(str, "\\n", "\n", -1) return str }