diff --git a/dashboard/main.go b/dashboard/main.go
index e5e402e2..7396b021 100644
--- a/dashboard/main.go
+++ b/dashboard/main.go
@@ -4,6 +4,7 @@ import (
"embed"
"encoding/json"
"fmt"
+ "html"
"io"
"net/http"
"strings"
@@ -120,17 +121,17 @@ func createEmbed(rw http.ResponseWriter, r *http.Request) {
text := fmt.Sprintf(`%s`, baseURL, path, "\n")
if data.AvatarURL != nil {
- text += fmt.Sprintf(`%s`, *data.AvatarURL, "\n")
+ text += fmt.Sprintf(`%s`, html.EscapeString(*data.AvatarURL), "\n")
} else if data.IconURL != nil {
- text += fmt.Sprintf(`%s`, *data.IconURL, "\n")
+ text += fmt.Sprintf(`%s`, html.EscapeString(*data.IconURL), "\n")
}
if data.Description != nil {
- text += fmt.Sprintf(`%s`, *data.Description, "\n")
+ text += fmt.Sprintf(`%s`, html.EscapeString(*data.Description), "\n")
}
if data.Color != nil {
- text += fmt.Sprintf(`%s`, *data.Color, "\n")
+ text += fmt.Sprintf(`%s`, html.EscapeString(*data.Color), "\n")
}
html, err := fs.ReadFile("dist/index.html")