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"\.([^\./]+)$")
| (?P<glyph> --)
# Links
- | (?P<macro> \<\<([^\s\|\>]+)(?:\s*\|\s*([^\>]+)|)\>\>)
- | (?P<hurl> \[\[([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\]\])
+ | (?P<macro> \<\<[^\>]+\>\>)
+ | (?P<hurl> \[\[[^\]]+\]\])
# Inline HTML
| (?P<html> <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b )
# Lists, divs, spans and inline objects
| (?P<li> ^\s+[\*\#]\s+)
| (?P<pre> \{\{\{|\s*\}\}\})
- | (?P<inl> \{\{([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\}\})
+ | (?P<inl> \{\{[^\}]+\}\})
# Tables
| (?P<tr> ^\s*\|\|(=|)\s*)