def METHOD_NAME(data, field):
    """
    Quote a field in a list of DNS records.
    Return the new data records.
    """
    if data is None:
        return None
    # embedded quotes require escaping - but only if not escaped already
    # note that semi-colons do not need escaping here since we are putting it
    # inside of a quoted string
    fieldBuf = ""
    escape = False
    for c in data[field]:
        if c == '"':
            fieldBuf += '\\"'
            escape = False
        elif c == '\\':
            if escape:
                fieldBuf += '\\\\'
                escape = False
            else:
                escape = True
        else:
            if escape:
                fieldBuf += '\\'
            fieldBuf += c
            escape = False
    data[field] = '"%s"' % fieldBuf
    return data