mirror of https://gitee.com/bigwinds/arangodb
strip illegal characters from collection names
This commit is contained in:
parent
9536857060
commit
e3a4ee8a7b
|
@ -98,7 +98,8 @@
|
|||
};
|
||||
|
||||
AppContext.prototype.collectionName = function (name) {
|
||||
var replaced = this.collectionPrefix + name.replace(/[^a-zA-Z0-9]/g, '_').replace(/(^_+|_+$)/g, '').substr(0, 64);
|
||||
var replaced = this.collectionPrefix.replace(/[:\.]+/g, '_') +
|
||||
name.replace(/[^a-zA-Z0-9]/g, '_').replace(/(^_+|_+$)/g, '').substr(0, 64);
|
||||
|
||||
if (replaced.length === 0) {
|
||||
throw new Error("Cannot derive collection name from '" + name + "'");
|
||||
|
|
Loading…
Reference in New Issue