Strip unicode null from deviceNames
Not sure how or why but sometimes deviceNames arrive on the server containing a null char. // FREEBIE
This commit is contained in:
parent
43ca465eb9
commit
9deaa95e8c
1 changed files with 1 additions and 0 deletions
|
@ -66,6 +66,7 @@
|
||||||
this.$('#sync').click(function(e) {
|
this.$('#sync').click(function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var name = this.$('#device-name').val();
|
var name = this.$('#device-name').val();
|
||||||
|
name = name.replace(/\0/g,''); // strip unicode null
|
||||||
if (name.trim().length === 0) {
|
if (name.trim().length === 0) {
|
||||||
this.$('#device-name').focus();
|
this.$('#device-name').focus();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue