Take out all special characters in string

This commit is contained in:
tiago.kayaya
2021-12-10 11:46:28 +01:00
parent d7300080c3
commit 7a2a21ec70
2 changed files with 1 additions and 2 deletions
@@ -57,6 +57,7 @@ export class NewGroupPage implements OnInit {
createGroup(){
let name = this.groupName.split(' ').join('-');
//Take out all special characters in string
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
let body = { "name":name, }
this.chatService.addGroup(body).subscribe(res=>{