standardebooks / tools

The Standard Ebooks toolset for producing our ebook files.
Other
1.42k stars 125 forks source link

A contributor with an & in the name causes create-draft to fail #474

Closed robinwhittleton closed 3 years ago

robinwhittleton commented 3 years ago
$ se create-draft --author "Test" --title "Test" --translator "Robin & Co."
Error  Couldn’t parse SVG file: /Users/robin/Code/standardebooks/corpus/test_test_robin-co/images/cover.svg.

The problem is that the ampersand in the SVG isn’t escaped. I’ve attempted a fix, but it’s spiraling out of control, and I don’t have time to take it further unfortunately. I suspect a “correct” fix would be to generate URL fragments, and escaped and unescaped names at the start, then use them in the appropriate places during the generation.

acabal commented 3 years ago

Just had to escape a few lines. Fixed in 3c91215