fixed #2732 -- group creation now using language keys, and no longer succeeds if a group by the name of 'guest' is created.

This commit is contained in:
Julian Lam
2015-02-18 15:33:21 -05:00
parent dca143fd87
commit 502e806f88
3 changed files with 35 additions and 31 deletions

View File

@@ -71,6 +71,7 @@
trimTrailingDash: /-$/g,
trimLeadingDash: /^-/g,
isLatin: /^[\w]+$/,
languageKeyRegex: /\[\[[\w]+:.+\]\]/,
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
slugify: function(str) {
@@ -108,6 +109,10 @@
return !isNaN(parseFloat(n)) && isFinite(n);
},
hasLanguageKey: function(input) {
return utils.languageKeyRegex.test(input);
},
// shallow objects merge
merge: function() {
var result = {}, obj, keys;