mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 12:42:16 +01:00
adding missing comment from previous commit
This commit is contained in:
@@ -57,6 +57,7 @@ type templateData struct {
|
|||||||
|
|
||||||
func markdownToHTML(dirPath, filename string) (template.HTML, error) {
|
func markdownToHTML(dirPath, filename string) (template.HTML, error) {
|
||||||
const op string = "printer.markdownToHTML"
|
const op string = "printer.markdownToHTML"
|
||||||
|
// avoid directory traversal.
|
||||||
filename = filepath.Base(filename)
|
filename = filepath.Base(filename)
|
||||||
fpath := fmt.Sprintf("%s/%s", dirPath, filename)
|
fpath := fmt.Sprintf("%s/%s", dirPath, filename)
|
||||||
b, err := ioutil.ReadFile(fpath)
|
b, err := ioutil.ReadFile(fpath)
|
||||||
|
|||||||
Reference in New Issue
Block a user