Mini Program's backend returns the front end data with\ ntransfer, but the front end does not wrap

clipboard.png

wxml
n

clipboard.png

clipboard.png

clipboard.png

Apr.09,2021

you can only use the text component. Check


< del > \ n replace with
. < / del >
< del > \ n is generated by line wrapping in the input box.
< / del >

is required in the actual html tag. < hr >

if \ n is escaped as "\ n" , you can replace the newline character

with "qwe\ n123" .replace (/\ nUnimax g, "n"). The

backend returns another split symbol, and the mini program end is replaced by n


.

should be a problem of JS string recognition. I just encountered it in web application, which is probably a reason. Just replace it directly:

data = data.replace('\n', '\n');
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1edc2d5-48329.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1edc2d5-48329.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?