OSDN Git Service
(root)
/
karesansui
/
karesansui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
727b100
)
Fix url validator with using regex.
master
author
Taizo ITO
<taizo@karesansui-project.info>
Wed, 16 Mar 2011 06:05:52 +0000
(15:05 +0900)
committer
Taizo ITO
<taizo@karesansui-project.info>
Wed, 16 Mar 2011 06:05:52 +0000
(15:05 +0900)
karesansui/lib/checker.py
patch
|
blob
|
history
diff --git
a/karesansui/lib/checker.py
b/karesansui/lib/checker.py
index
b6c60d7
..
55380a3
100644
(file)
--- a/
karesansui/lib/checker.py
+++ b/
karesansui/lib/checker.py
@@
-1227,7
+1227,7
@@
class Checker(object):
_file_flag = False
if check & CHECK_VALID:
- regex = '^(http|ftp):\/\/[\w.]+\/(\S*)'
+ regex = '^(http|ftp):\/\/[\w.
\-
]+\/(\S*)'
m = re.compile(regex).search(value)
if m:
_http_flag = True