Bug 1404349 - Extend check from bug 1370497 to apply to marks with a specific Script property, as well as those with Script=Inherited. r=valentin

This commit is contained in:
Jonathan Kew 2017-10-09 13:23:18 +01:00
Родитель 7417b9b0d4
Коммит 597f9d1021
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -780,7 +780,6 @@ bool nsIDNService::isLabelSafe(const nsAString &label)
if (illegalScriptCombo(script, savedScript)) {
return false;
}
lastScript = script;
}
// Check for mixed numbering systems
@ -833,6 +832,10 @@ bool nsIDNService::isLabelSafe(const nsAString &label)
}
}
if (script != Script::COMMON && script != Script::INHERITED) {
lastScript = script;
}
// Simplified/Traditional Chinese check temporarily disabled -- bug 857481
#if 0

Просмотреть файл

@ -300,6 +300,9 @@ const testcases = [
["goo\u0650gle", "xn--google-yri", false, false, false],
// ...but Arabic diacritics are allowed on Arabic text
["العَرَبِي", "xn--mgbc0a5a6cxbzabt", false, true, true],
// Hebrew diacritic also not allowed in Latin text (bug 1404349)
["goo\u05b4gle", "xn--google-rvh", false, false, false],
];
const profiles = ["ASCII", "high", "moderate"];