зеркало из https://github.com/mozilla/pjs.git
Fixed filtering of characters in Named Anchor properties dialog (characters > 127 are allowed). b=74137, r=nhotta, sr=brendan
This commit is contained in:
Родитель
d8232795e7
Коммит
b76747b155
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче