Handle special chars in exercice path
This commit is contained in:
parent
3bf0fc69ee
commit
45a9240834
2 changed files with 6 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -235,7 +236,7 @@ func BuildExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*
|
|||
errs = append(errs, fmt.Sprintf("%q: resolution.mp4: The file is empty!", edir))
|
||||
e.VideoURI = ""
|
||||
} else {
|
||||
e.VideoURI = path.Join("$FILES$", e.VideoURI)
|
||||
e.VideoURI = strings.Replace(url.PathEscape(path.Join("$FILES$", e.VideoURI)), "%2F", "/", -1)
|
||||
resolutionFound = true
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue