URLs in files render incorrectly

When links are rendered, the spaces in a URL are being replaced by a hyphen rather than %20. This is creating a broken link, and a 404 page.

I don’t know if this is a bug or a configurable option, but I can’t seem to find a way to configure it.