From: Ardis Lu Date: Fri, 26 May 2023 04:56:06 +0000 (-0700) Subject: Lowercase all names per UTS46 X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=3a2f681c9bbf2741172434146af56f99970e7996;p=ens2hex Lowercase all names per UTS46 The normalization is not fully compliant but still works for most names --- diff --git a/index.html b/index.html index 800dfa6..0119ac2 100644 --- a/index.html +++ b/index.html @@ -327,7 +327,7 @@ const formData = new FormData(event.target); const combined = `${formData.get('text')}\n${await formData.get('file').text()}`; // Concatenate textarea and file inputs - const parsed = new Set(combined.split('\n').map(c => c.split(',')).flat().map(e => e.trim())); // Split on newline or comma, flatten, trim whitespace, de-duplicate + const parsed = new Set(combined.split('\n').map(c => c.split(',')).flat().map(e => e.trim().toLocaleLowerCase())); // Split on newline or comma, flatten, trim whitespace, lowercase, and de-duplicate const cleaned = [...parsed].filter(name => name.slice(-4) === '.eth'); // Remove anything that does not end in '.eth' if (cleaned.length === 0) {