webcmd/html.go

17 lines
263 B
Go
Raw Normal View History

2017-03-25 02:41:36 +00:00
package webcmd
import (
"html"
"log"
"net/http"
)
func hesc(in string) string {
return html.EscapeString(in)
}
func fail(w http.ResponseWriter, r *http.Request, s string) {
log.Printf("[%s] %s", r.RemoteAddr, s)
http.Error(w, "Malformed request", 400)
}