def ldapUrlEscape(s):
 return quote(s).replace(',', '%2C').replace('/', '%2F')

def ldapUrlEscape ( s ) : return quote ( s ) . replace ( ',' , '%2C' ) . replace ( '/' , '%2F' )
returns url encoding of string s .