blockstack_zones/record_processors.py
def process_txt(data, template):
    """
    Replace {txt} in template with the serialized TXT records
    """
    if data is None:
        to_process = None
    else:
        # quote txt
        to_process = copy.deepcopy(data)
        for datum in to_process:
            if isinstance(datum["txt"], list):
                datum["txt"] = " ".join(['"%s"' % entry.replace(";", "\;")
                                         for entry in datum["txt"]])
            else:
                datum["txt"] = '"%s"' % datum["txt"].replace(";", "\;")
    return process_rr(to_process, "TXT", "txt", "{txt}", template)
def process_txt(data, template):
    """
    Replace {txt} in template with the serialized TXT records
    """
    if data is None:
        to_process = None
    else:
        # quote txt
        to_process = copy.deepcopy(data)
        for datum in to_process:
            if isinstance(datum["txt"], list):
                datum["txt"] = " ".join(['"%s"' % entry.replace(";", "\;")
                                         for entry in datum["txt"]])
            else:
                datum["txt"] = '"%s"' % datum["txt"].replace(";", "\;")
    return process_rr(to_process, "TXT", "txt", "{txt}", template)
def process_txt ( data , template ) : if data is None : to_process = None else : # quote txt to_process = copy . deepcopy ( data ) for datum in to_process : if isinstance ( datum [ "txt" ] , list ) : datum [ "txt" ] = " " . join ( [ '"%s"' % entry . replace ( ";" , "\;" ) for entry in datum [ "txt" ] ] ) else : datum [ "txt" ] = '"%s"' % datum [ "txt" ] . replace ( ";" , "\;" ) return process_rr ( to_process , "TXT" , "txt" , "{txt}" , template )
Replace {txt} in template with the serialized TXT records
Replace { txt } in template with the serialized TXT records