From 4f32de44973484d58cd25ccd8c7c86046ad84652 Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Mon, 29 May 2017 17:11:13 -0700 Subject: [PATCH] #402: M1364283 --- netwerk/dns/nsIDNService.cpp | 7 ++++--- netwerk/test/unit/test_idn_urls.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/netwerk/dns/nsIDNService.cpp b/netwerk/dns/nsIDNService.cpp index 98a760aee..d75e6ee33 100644 --- a/netwerk/dns/nsIDNService.cpp +++ b/netwerk/dns/nsIDNService.cpp @@ -807,11 +807,12 @@ bool nsIDNService::isLabelSafe(const nsAString &label) ch = SURROGATE_TO_UCS4(ch, *current++); } - // Check for restricted characters; aspirational scripts are permitted + // Check for restricted characters; aspirational scripts are NOT permitted, + // in anticipation of the category being merged into Limited-Use scripts + // in the upcoming (Unicode 10.0-based) revision of UAX #31. XidmodType xm = GetIdentifierModification(ch); if (xm != XIDMOD_RECOMMENDED && - xm != XIDMOD_INCLUSION && - xm != XIDMOD_ASPIRATIONAL) { + xm != XIDMOD_INCLUSION) { return false; } diff --git a/netwerk/test/unit/test_idn_urls.js b/netwerk/test/unit/test_idn_urls.js index 061788e3c..06a53032b 100644 --- a/netwerk/test/unit/test_idn_urls.js +++ b/netwerk/test/unit/test_idn_urls.js @@ -38,8 +38,8 @@ const testcases = [ // Cherokee (Restricted script) ["ᏣᎳᎩ", "xn--f9dt7l", false, false, false], - // Yi (Aspirational script) - ["ꆈꌠꁱꂷ", "xn--4o7a6e1x64c", false, true, true], + // Yi (former Aspirational script, now Restricted per Unicode 10.0 update to UAX 31) + ["ꆈꌠꁱꂷ", "xn--4o7a6e1x64c", false, false, false], // Greek alone ["πλάτων", "xn--hxa3ahjw4a", false, true, true],