fehlerbehebung

This commit is contained in:
xoy 2023-01-29 16:33:16 +01:00
parent 076d92ba93
commit 3646c0e50d
2 changed files with 9 additions and 5 deletions

12
html.go
View File

@ -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
}

View File

@ -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!")
}