mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 10:10:31 +00:00
Disable the check for mixed Simplified and Traditional Chinese characters when determining whether to display IDN labels as unicode or punycode. Bug 857481, r=honzab
This commit is contained in:
parent
9633dbed87
commit
1c35ddee88
@ -752,7 +752,10 @@ bool nsIDNService::isLabelSafe(const nsAString &label)
|
||||
int32_t lastScript = MOZ_SCRIPT_INVALID;
|
||||
uint32_t previousChar = 0;
|
||||
uint32_t savedNumberingSystem = 0;
|
||||
// Simplified/Traditional Chinese check temporarily disabled -- bug 857481
|
||||
#if 0
|
||||
HanVariantType savedHanVariant = HVT_NotHan;
|
||||
#endif
|
||||
|
||||
int32_t savedScript = -1;
|
||||
|
||||
@ -807,6 +810,9 @@ bool nsIDNService::isLabelSafe(const nsAString &label)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Simplified/Traditional Chinese check temporarily disabled -- bug 857481
|
||||
#if 0
|
||||
|
||||
// Check for both simplified-only and traditional-only Chinese characters
|
||||
HanVariantType hanVariant = GetHanVariant(ch);
|
||||
if (hanVariant == HVT_SimplifiedOnly || hanVariant == HVT_TraditionalOnly) {
|
||||
@ -816,6 +822,7 @@ bool nsIDNService::isLabelSafe(const nsAString &label)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
previousChar = ch;
|
||||
}
|
||||
|
@ -172,10 +172,10 @@ const testcases = [
|
||||
["万城", "xn--chq31v", false, true, true],
|
||||
|
||||
// Simplified-only and Traditional-only Chinese in the same label
|
||||
["万萬城", "xn--chq31vsl1b", false, false, false],
|
||||
["万萬城", "xn--chq31vsl1b", false, true, true],
|
||||
|
||||
// Traditional-only and Simplified-only Chinese in the same label
|
||||
["萬万城", "xn--chq31vrl1b", false, false, false],
|
||||
["萬万城", "xn--chq31vrl1b", false, true, true],
|
||||
|
||||
// Han and Latin and Bopomofo
|
||||
["注音符号bopomofoㄅㄆㄇㄈ",
|
||||
|
Loading…
Reference in New Issue
Block a user