package utils import ( "bytes" "html" "strings" ) // RenderQuoteText renders the given quote text. func RenderQuoteText(text string) string { buffer := bytes.Buffer{} buffer.WriteString("
")
lines := strings.Split(text, "\n")
for index, line := range lines {
buffer.WriteString("")
buffer.WriteString(html.EscapeString(line))
buffer.WriteString("")
if index != len(lines)-1 {
buffer.WriteString("
")
}
}
buffer.WriteString("