`clean_filename` not being run on `tag_` pages?
I have somehow ended up with a file called tag_lempipuut-helsingissä.html. It still works fine, but I was under the impression that all filenames are supposed to go through clean_filename to make them all ASCII.
I tried to look through the code and find the problem myself, but I was unable to pinpoint it right now. Will try again at a better time.
Oh wait, clean_filename() has nothing to do with this.
Right, as commented by @cfenollosa at #45:
Anything that generates a file name should
eval $(convert_filename). Apply that to tag generation name.
This might get harder then just putting this function call to appropriate places, because there might be some unexpected stuff. For example, when building tag_*.html pages themselves, we use filename to find out the tag name. Also, when scanning for "all tags referenced by this post" we use regexp which expects tagname to be the same both in filename and link text - it might be easier to fix, but harder to spot ;)
Mmm yes, as @Lex-2008 says, we use the tag name to match posts which use it.
This presents a dilemma: what good it is to call convert_filename to create post names (from titles) if we don't to the same for tags. Should we remove this altogether and trust the file system?
Well, I'd rather leave convert_filename and start using it for tag filenames, too. Because not all characters which are allowed in filenames, are welcome in URLs. For example, we probably want to keep replacing spaces with dashes.
And concerning the tag "text" vs tag filename: I believe that, when building a tag_*.html page, we can save the tag text from any of the posts referenced by it.
How about just putting the tag text in an HTML comment inside the tag_foo.html? That way you can put the filename through convert_filename but don't have to find to find a post linked to by tag_foo.html and then parse that to find the tag text.