Small program upload picture return address carriage return space problem

Time:2021-7-19

I don’t know what’s going on. There was no problem before I uploaded the picture in the small program today. Today, there were many carriage return spaces

What should we do? Deal with it

//Remove the space
str = str.replace(/\ +/g,"");   
console.log(str);
//"{'retmsg':'success',
//'trans_date':'20170906'}"


//Remove carriage return and wrap        
str = str.replace(/[\r\n]/g,"");        
console.log(str);

image-20200705191449666

OK, perfect solution

Free use of high value background management system###Zifeng background management system###It can be directly installed on the pagoda panel

Welcome to my official account: the wonderful world of Zi Feng, exclusive learning resources and daily dry cargo push.
If you are interested in my other topics, please go directly to my personal blog:www.wangmingchang.com

Recommended Today

What should I do to become a full stack engineer?

Introduction: how to become a full stack engineer? What technical accumulation is required? What are the benefits of being a full stack engineer? I hope this article can provide some help for students who hope to become engineers of the whole stack and share with them. As developers, we don’t excessively distinguish between server and […]