Fixed filtering of characters in Named Anchor properties dialog (characters > 127 are allowed). b=74137, r=nhotta, sr=brendan

This commit is contained in:
cmanske%netscape.com 2001-05-17 19:21:11 +00:00
Родитель d8232795e7
Коммит b76747b155
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -327,10 +327,11 @@ function ReplaceWhitespace(string, charReplace) {
}
// Replace whitespace with "_" and allow only HTML CDATA
// characters: "a"-"z","A"-"Z","0"-"9", "_", ":", "-", and "."
// characters: "a"-"z","A"-"Z","0"-"9", "_", ":", "-", ".",
// and characters above ASCII 127
function ConvertToCDATAString(string)
{
return string.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_\.\-\:]+/g,'');
return string.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_\.\-\:\u0080-\uFFFF]+/g,'');
}
// this function takes an elementID and a flag