remove a bogus anchor tag for namespace links
improve filename creation (#677)

We now allow a much larger range of characters in filenames. We also URL-encode HTML links when necessary, so that everything still works when you upload the files to a web server.