fehlerbehebung
This commit is contained in:
parent
6df99b809c
commit
fe61a79141
12
html.go
12
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
|
||||
}
|
||||
|
|
2
http.go
2
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!")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue