JavaScript string with new line - but not using \n

前端 未结 8 2071
故里飘歌
故里飘歌 2020-11-27 05:44

I have a string that has new lines in. I am wanting to convert these to HTML
s, but I\'m having a hard time detecting them.

Imagine a JavaScri

8条回答
  •  情歌与酒
    2020-11-27 06:09

    I think they using \n anyway even couse it not visible, or maybe they using \r. So just replace \n or \r with

提交回复
热议问题