From e7f4f495cdfed8c6b658a04f94ac6ad25f2d02d1 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sat, 13 Mar 2010 12:31:52 -0500 Subject: [PATCH] allow spaces in filenames --- geekigeeki.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 317e9ca..3afc3e8 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -25,7 +25,7 @@ video_ext = "ogg|ogv|oga" # Not supported by Firefox 3.5: mkv|mpg|mpeg|mp4|avi|a image_re = re.compile(r".*\.(" + image_ext + "|" + video_ext + ")$", re.IGNORECASE) video_re = re.compile(r".*\.(" + video_ext + ")$", re.IGNORECASE) # FIXME: we accept stuff like foo/../bar and we shouldn't -file_re = re.compile(r"([A-Za-z0-9_\-][A-Za-z0-9_\.\-/]*)$") +file_re = re.compile(r"([A-Za-z0-9_\-][A-Za-z0-9_\.\-/ ]*)$") url_re = re.compile(r"[a-z]{3,8}://[^\s'\"]+\S$") ext_re = re.compile(r"\.([^\./]+)$") @@ -556,8 +556,8 @@ class WikiFormatter: | (?P --) # Links - | (?P \<\<([^\s\|\>]+)(?:\s*\|\s*([^\>]+)|)\>\>) - | (?P \[\[([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\]\]) + | (?P \<\<[^\>]+\>\>) + | (?P \[\[[^\]]+\]\]) # Inline HTML | (?P <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b ) @@ -573,7 +573,7 @@ class WikiFormatter: # Lists, divs, spans and inline objects | (?P
  • ^\s+[\*\#]\s+) | (?P
       \{\{\{|\s*\}\}\})
    -            | (?P   \{\{([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\}\})
    +            | (?P   \{\{[^\}]+\}\})
     
                 # Tables
                 | (?P    ^\s*\|\|(=|)\s*)
    -- 
    2.25.1