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++);
}
// 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;
}

View File

@ -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],