Skip to content

Commit be01ceb

Browse files
committed
escape url
1 parent 393102c commit be01ceb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/start.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package pkg
22

33
import (
4+
"net/url"
45
"os"
56
"path/filepath"
67
"strings"
@@ -80,6 +81,10 @@ func Start(dir, ext, name string, extension, network, realtime bool, port, ws_po
8081
if err != nil {
8182
return ctx.Next()
8283
}
84+
p, err = url.QueryUnescape(p)
85+
if err != nil {
86+
return ctx.Next()
87+
}
8388
return internal.Render(ctx, frontend.Index(ctx.Path(), p))
8489
})
8590
box := pterm.DefaultBox.WithTitle(name).WithTitleTopCenter()

0 commit comments

Comments
 (0)