Skip to content

Commit

Permalink
Handle redacted addresses display
Browse files Browse the repository at this point in the history
  • Loading branch information
erinysong committed Aug 12, 2024
1 parent 4b3a36b commit 43466cc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion _includes/whois-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
return contactFieldToLabel[contactField];
}

function displayContactData(contactDetail) {
let contactField = contactDetail[0]
let contactData = contactDetail[3]

if (contactField === "adr") {
if (contactData[0] === "REDACTED FOR PRIVACY") {
return "REDACTED FOR PRIVACY";
} else {
return contactData.join(" ");
}
}
return contactData;
}

// displays contact information for listed domain entities
entities.forEach(entity => {
const roles = entity["roles"];
Expand Down Expand Up @@ -99,7 +113,6 @@ <h3>${notice.title ? notice.title : "Notice"}</h3>
function searchRdapData(searchId="rdap-search", searchResultsId="rdap-search-results") {
event.preventDefault();

const whoisServer = 'whois.dotgov.gov';
const rdapBaseUrl = 'https://rdap.cloudflareregistry.com/rdap/domain/';

let domain = document.getElementById(searchId).value
Expand Down

0 comments on commit 43466cc

Please sign in to comment.