web/wp-admin/js/wp-gears.dev.js
branchwordpress
changeset 132 4d4862461b8d
parent 109 03b0d1493584
equal deleted inserted replaced
131:a4642baaf829 132:4d4862461b8d
    26 				this.message(4);
    26 				this.message(4);
    27 		}
    27 		}
    28 	},
    28 	},
    29 
    29 
    30 	storeName : function() {
    30 	storeName : function() {
    31 		var name = window.location.protocol + window.location.host;
    31 		var name, host = window.location.host;
    32 
    32 
    33 		name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
    33 		if ( host.match(/[^a-z0-9._-]/i) )
       
    34 			host = encodeURIComponent(host);
       
    35 		
       
    36 		name = window.location.protocol + host;
       
    37 		name = name.replace(/[^a-z0-9._-]+/gi, '_');
    34 		name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
    38 		name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
    35 
    39 
    36 		return name;
    40 		return name;
    37 	},
    41 	},
    38 
    42