(self, content_disposition)
return content_disposition
http://manage.dimagi.com/default.asp?229983
        Sometimes filenames have characters in them which aren't allowed in
        headers and causes the download to fail.
http://manage.dimagi.com/default.asp?229983
        Sometimes filenames have characters in them which aren't allowed in
        headers and causes the download to fail.
http : // manage . dimagi . com / default . asp?229983 Sometimes filenames have characters in them which aren t allowed in headers and causes the download to fail .
def clean_content_disposition(self, content_disposition):
        """
        http://manage.dimagi.com/default.asp?229983
        Sometimes filenames have characters in them which aren't allowed in
        headers and causes the download to fail.
        """
        if isinstance(content_disposition, str):
            return re.compile('[\r\n]').sub('', content_disposition)

        return content_disposition
def clean_content_disposition ( self , content_disposition ) : if isinstance ( content_disposition , str ) : return re . compile ( '[\r\n]' ) . sub ( '' , content_disposition ) return content_disposition