mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-28 07:22:00 +00:00
small fixes
This commit is contained in:
parent
2eaa9f82c2
commit
d48315ab57
3 changed files with 3 additions and 3 deletions
|
@ -113,7 +113,7 @@ Thank you very much.
|
||||||
|
|
||||||
### Test Server
|
### Test Server
|
||||||
|
|
||||||
Make sure you have [golang](https://go.dev) v1.20 or newer and [just](https://just.systems/man/en/) installed.
|
Make sure you have [golang](https://go.dev) v1.21 or newer and [just](https://just.systems/man/en/) installed.
|
||||||
|
|
||||||
run `just dev`
|
run `just dev`
|
||||||
now this pages should work:
|
now this pages should work:
|
||||||
|
|
|
@ -2,8 +2,8 @@ package html
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"html/template"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"text/template" // do not use html/template here, we sanitize the message before passing it to the template
|
||||||
|
|
||||||
"codeberg.org/codeberg/pages/server/context"
|
"codeberg.org/codeberg/pages/server/context"
|
||||||
"github.com/microcosm-cc/bluemonday"
|
"github.com/microcosm-cc/bluemonday"
|
||||||
|
|
|
@ -147,7 +147,7 @@ func handleSubDomain(log zerolog.Logger, ctx *context.Context, giteaClient *gite
|
||||||
|
|
||||||
// Couldn't find a valid repo/branch
|
// Couldn't find a valid repo/branch
|
||||||
html.ReturnErrorPage(ctx,
|
html.ReturnErrorPage(ctx,
|
||||||
fmt.Sprintf("could not find a valid repository or branch: <code>%s</code>", targetRepo),
|
fmt.Sprintf("could not find a valid repository or branch for repository: <code>%s</code>", targetRepo),
|
||||||
http.StatusNotFound)
|
http.StatusNotFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue