Logo Search packages:      
Sourcecode: harvestman version File versions  Download package

def HarvestMan::urlparser::HarvestManUrlParser::make_valid_filename (   self,
  s 
)

Replace junk characters to create a valid
filename 

Definition at line 406 of file urlparser.py.

00406                                     :
        """ Replace junk characters to create a valid
        filename """

        junks='?*"<>!:/\\'
        for x in iter(junks):
            s = s.replace(x, '')

        # replace '%20' with the space
        # character (generated by POST requests)
        s = s.replace('%20', ' ')
        # replace %7E with ~
        s = s.replace('%7E', '~')
        # replace %2B with +
        s = s.replace('%2B', '+')
        
        return s


Generated by  Doxygen 1.6.0   Back to index