fixed breaking file download

swagger
Akhil Gupta 4 years ago
parent a161bb2aa9
commit ff631fafdb

@ -131,7 +131,7 @@
{{if .DownloadPath}} {{if .DownloadPath}}
<a <a
class="button" class="button"
href="{{ .DownloadPath }}" href="/{{ .DownloadPath }}"
download download
title="Download episode file" title="Download episode file"
><i class="fas fa-download"></i ><i class="fas fa-download"></i

@ -350,7 +350,7 @@ func cleanAttributes(a []parser.Attribute, allowed []string) []parser.Attribute
// A list of characters we consider separators in normal strings and replace with our canonical separator - rather than removing. // A list of characters we consider separators in normal strings and replace with our canonical separator - rather than removing.
var ( var (
separators = regexp.MustCompile(`[!&_="|+?:]`) separators = regexp.MustCompile(`[!&_="#|+?:]`)
dashes = regexp.MustCompile(`[\-]+`) dashes = regexp.MustCompile(`[\-]+`)
) )

@ -29,6 +29,7 @@ func main() {
r.Static("/webassets", "./webassets") r.Static("/webassets", "./webassets")
r.Static("/assets", dataPath) r.Static("/assets", dataPath)
r.Use(setupSettings()) r.Use(setupSettings())
r.Use(gin.Recovery())
funcMap := template.FuncMap{ funcMap := template.FuncMap{
"isDateNull": func(raw time.Time) bool { "isDateNull": func(raw time.Time) bool {

Loading…
Cancel
Save