Parse html especial char con description

This commit is contained in:
Las Zenow 2012-08-19 16:59:10 +02:00
parent a0d4acdf89
commit 67907a3629

View file

@ -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, "&amp;", "&", -1)
str = strings.Replace(str, "&lt;", "<", -1)
str = strings.Replace(str, "&gt;", ">", -1)
str = strings.Replace(str, "\\n", "\n", -1)
return str
}