Skip to content

Commit

Permalink
Comment valid char array
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Vincent committed Apr 27, 2011
1 parent 46aa704 commit c2a6d67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sanitise.py
Expand Up @@ -40,8 +40,10 @@ def sanitise(str):
str = removeAccents(str)
str = regex(str)

# Permit only letters, digits, dash (seperator) and dot (file extension)
valid = string.ascii_letters + string.digits + "-."
str = "".join([chr for chr in str if chr in valid])

return str.lower()

def parseArguments():
Expand Down

0 comments on commit c2a6d67

Please sign in to comment.