Merge "init: allow ':' in property names" am: af95ecdb04
am: 6d2a27768d
Change-Id: I8eaadce8365b86f8a3cab36a18e4fa81901546d9
This commit is contained in:
commit
3d2aa93e1d
1 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ bool is_legal_property_name(const std::string& name) {
|
|||
if (name[0] == '.') return false;
|
||||
if (name[namelen - 1] == '.') return false;
|
||||
|
||||
/* Only allow alphanumeric, plus '.', '-', '@', or '_' */
|
||||
/* Only allow alphanumeric, plus '.', '-', '@', ':', or '_' */
|
||||
/* Don't allow ".." to appear in a property name */
|
||||
for (size_t i = 0; i < namelen; i++) {
|
||||
if (name[i] == '.') {
|
||||
|
@ -152,7 +152,7 @@ bool is_legal_property_name(const std::string& name) {
|
|||
if (name[i-1] == '.') return false;
|
||||
continue;
|
||||
}
|
||||
if (name[i] == '_' || name[i] == '-' || name[i] == '@') continue;
|
||||
if (name[i] == '_' || name[i] == '-' || name[i] == '@' || name[i] == ':') continue;
|
||||
if (name[i] >= 'a' && name[i] <= 'z') continue;
|
||||
if (name[i] >= 'A' && name[i] <= 'Z') continue;
|
||||
if (name[i] >= '0' && name[i] <= '9') continue;
|
||||
|
|
Loading…
Reference in a new issue