This commit is contained in:
Cameron Kaiser 2017-05-29 17:11:13 -07:00
parent 372305104e
commit 4f32de4497
2 changed files with 6 additions and 5 deletions

View File

@ -807,11 +807,12 @@ bool nsIDNService::isLabelSafe(const nsAString &label)
ch = SURROGATE_TO_UCS4(ch, *current++); 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); XidmodType xm = GetIdentifierModification(ch);
if (xm != XIDMOD_RECOMMENDED && if (xm != XIDMOD_RECOMMENDED &&
xm != XIDMOD_INCLUSION && xm != XIDMOD_INCLUSION) {
xm != XIDMOD_ASPIRATIONAL) {
return false; return false;
} }

View File

@ -38,8 +38,8 @@ const testcases = [
// Cherokee (Restricted script) // Cherokee (Restricted script)
["ᏣᎳᎩ", "xn--f9dt7l", false, false, false], ["ᏣᎳᎩ", "xn--f9dt7l", false, false, false],
// Yi (Aspirational script) // Yi (former Aspirational script, now Restricted per Unicode 10.0 update to UAX 31)
["ꆈꌠꁱꂷ", "xn--4o7a6e1x64c", false, true, true], ["ꆈꌠꁱꂷ", "xn--4o7a6e1x64c", false, false, false],
// Greek alone // Greek alone
["πλάτων", "xn--hxa3ahjw4a", false, true, true], ["πλάτων", "xn--hxa3ahjw4a", false, true, true],