diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/wikipediafs/fs.py | 5 |
2 files changed, 10 insertions, 4 deletions
@@ -1,9 +1,10 @@ -2007-05-26 Mathieu Blondel <mblondel@users.sourceforge.net> +2007-05-2è Mathieu Blondel <mblondel@users.sourceforge.net> + +- Fixed the problem with articles having special characters like & (article.py). -- article.py: encode urls. This fixes the problem with articles having special -characters like &. +- Made the man page optional in the install process (setup.py). -- setup.py: make the man page optional in the install process. +- Check invalid characters in article name. (fs.py) === WikipediaFS 0.3 === diff --git a/src/wikipediafs/fs.py b/src/wikipediafs/fs.py index 3792129..78dcf5e 100644 --- a/src/wikipediafs/fs.py +++ b/src/wikipediafs/fs.py @@ -42,6 +42,11 @@ class ArticleDir: def is_valid_file(self, path): file_name = self.get_article_file_name(path) + + for forbidden_char in ('#', '<', '>', '[', ']', '|', '{', '}'): + if file_name.count(forbidden_char) > 0: + return False + if file_name[-3:] == ".mw": return True else: |