diff --git a/html.go b/html.go
index d1a897c..c588804 100644
--- a/html.go
+++ b/html.go
@@ -77,9 +77,9 @@ func htmlReplacer(input string, activePage string) string {
break
}
- tempA = htmlElement("h2", Event.title, "")
- tempA += htmlElement("p", Event.description, "")
- tempA += htmlElement("p", Event.date, "")
+ tempA = htmlElement("h2", htmlClean(Event.title), "")
+ tempA += htmlElement("p", htmlClean(Event.description), "")
+ tempA += htmlElement("p", htmlClean(Event.date), "")
tempB += htmlElement("div", tempA, "class=\"event\"")
}
output = strings.ReplaceAll(output, "!EVENTS", htmlElement("div", tempB, "class=\"eventList\""))
@@ -96,3 +96,9 @@ func htmlReplacer(input string, activePage string) string {
return output
}
+
+func htmlClean(htmlString string) string {
+ htmlString = strings.ReplaceAll(htmlString, "<", "[")
+ htmlString = strings.ReplaceAll(htmlString, ">", "]")
+ return htmlString
+}
diff --git a/http.go b/http.go
index 50163d3..ea533b7 100644
--- a/http.go
+++ b/http.go
@@ -79,9 +79,7 @@ func httpHandleFuncWithPOST(urlPath string, filepath string, contentType string)
errorPanic(err)
}
logger("event added!")
- logger("----------------HANDLE IMAGES----------------")
handleImages()
- logger("----------------HANDLE END----------------")
} else {
logger("event not added!")
}