adding missing comment from previous commit

This commit is contained in:
Julien Neuhart
2020-06-05 12:00:57 +02:00
parent b25456835a
commit 5540438595

View File

@@ -57,6 +57,7 @@ type templateData struct {
func markdownToHTML(dirPath, filename string) (template.HTML, error) {
const op string = "printer.markdownToHTML"
// avoid directory traversal.
filename = filepath.Base(filename)
fpath := fmt.Sprintf("%s/%s", dirPath, filename)
b, err := ioutil.ReadFile(fpath)