Commit c9ca0b6df86de13a5302b5a3c955fb2fb1023d36 broke html links in my publishing setup. The links on my website point to file.org rather than file.html. The problem is a mismatch between line 145 and 2695. The attached patch fixes the issue.