Filenames containing backtick are not escaped properly
nkovacs opened this issue · 3 comments
nkovacs commented
Although unlikely, it's valid for a filename to contain a backtick, which would result in an invalid go file.
I have a fix in https://github.com/nkovacs/go.rice/tree/filename-quote, but it depends on #93 for tests.
nkovacs commented
Another (even more unlikely) issue: it's possible for a filename to contain a newline, which will break the // {{.Filename}}
part, since the generated code will look like this:
ChildFiles: []*embedded.EmbeddedFile{
filec, // new
line
filed, // test1.txt
filee, // test2.txt
},
Edit: nkovacs@f79b376.
GeertJohan commented
I'd be happy to take that as a PR!
GeertJohan commented
Thanks, I've merged it.