def makesafe(s):
    """Makes the given string "safe" by replacing spaces and lower-casing (less aggressive)"""
    def rep(c):
        if c.isalnum():
            return c.lower()
        else:
            return '_'
    ret = ''.join([rep(c) for c in s])
    return ret