Merge branch 'hotfix/v0.0.4' of github.com:ONLYOFFICE/AppServer into hotfix/v0.0.4

This commit is contained in:
Alexey Kostenko 2020-12-21 14:05:23 +03:00
commit 551454683b
3 changed files with 12 additions and 3 deletions

View File

@ -222,7 +222,14 @@ class FilesRowContent extends React.PureComponent {
}
renameTitle = (e) => {
this.setState({ itemTitle: e.target.value });
let title = e.target.value;
//const chars = '*+:"<>?|/'; TODO: think how to solve problem with interpolation escape values in i18n translate
const regexp = new RegExp('[*+:"<>?|\\\\/]', "gim");
if (title.match(regexp)) {
toastr.warning(this.props.t("ContainsSpecCharacter"));
}
title = title.replace(regexp, "_");
return this.setState({ itemTitle: title });
};
cancelUpdateItem = (e) => {

View File

@ -116,5 +116,6 @@
"MoveItem": "<strong>{{title}}</strong> moved",
"MoveItems": "<strong>{{qty}}</strong> elements has been moved",
"CopyItem": "<strong>{{title}}</strong> copied",
"CopyItems": "<strong>{{qty}}</strong> elements copied"
"CopyItems": "<strong>{{qty}}</strong> elements copied",
"ContainsSpecCharacter": "The title cannot contain any of the following characters: *+:\"<>?|/"
}

View File

@ -116,5 +116,6 @@
"MoveItem": "<strong>{{title}}</strong> перемещен",
"MoveItems": "Перемещено элементов: <strong>{{qty}}</strong>",
"CopyItem": "<strong>{{title}}</strong> скопирован",
"CopyItems": "Скопировано элементов: <strong>{{qty}}</strong>"
"CopyItems": "Скопировано элементов: <strong>{{qty}}</strong>",
"ContainsSpecCharacter": "Название не должно содержать следующих символов: *+:\"<>?|/"
}