Why does a table in word in js take up thousands of characters when converted into a string?

chatMsg = filterChatMsg(chatMsg);
            var msgObj ={
                    msg:chatMsg,
                    userId:"ac_"+AgentObj.agentId
                }
            var centertab = Ext.getCmp("center_id");
            if(currentWin.indexOf("c_")!==0){
                alert("");
                return  false;
            }
            if(chatMsg==""||chatMsg==null){
                alert("");
                return false;
            }
            if(chatMsg.length>500){
                alert(chatMsg.length);//
                alert("500");
                return false;
            }
Apr.09,2021

Space s is occupied

Menu