hi everyone, i have problem to view html format within go template.
i have services that return values, i insert
to one of them like this :
func ToProduct(product ProductModel.Product) ProductResponse {
return ProductResponse{
Code: product.Code,
Title: product.Title,
Description: product.Description,
Qty: product.Qty,
Price: product.Price,
Price1: product.Price1,
ShortNotes: product.ShortNotes,
Notes: strings.Replace(product.Notes, ",", "<br>", -1),
Image: "/assets/img/products/" + product.Code + ".jpg",
DivName: product.DivName,
}
}
in html template, i put this
{{ .product.Notes }}
but the result
appear like original text not new line