candidate_pat formated with candidate_subs and re.UNICODE. candidate_subs is dictionary created from elements in return value of the function urlquote called with argument v,
candidate_subs = dict ( ( k , urlquote ( v ) ) for ( k , v ) in candidate_subs . items ( ) )