Git repository of Karesansui.
Revision | 9ceba3b4a60fd9f090adea1ebcb6629c61f8bbb2 (tree) |
---|---|
Time | 2011-03-16 15:05:52 |
Author | Taizo ITO <taizo@kare...> |
Commiter | Taizo ITO |
Fix url validator with using regex.
@@ -1227,7 +1227,7 @@ class Checker(object): | ||
1227 | 1227 | _file_flag = False |
1228 | 1228 | if check & CHECK_VALID: |
1229 | 1229 | |
1230 | - regex = '^(http|ftp):\/\/[\w.]+\/(\S*)' | |
1230 | + regex = '^(http|ftp):\/\/[\w.\-]+\/(\S*)' | |
1231 | 1231 | m = re.compile(regex).search(value) |
1232 | 1232 | if m: |
1233 | 1233 | _http_flag = True |