Remember the problem of rich text display content in the development of a web project

Added rich text to web projects to enrich project functions

In the process of using rich text, there was a problem that after filling in the rich text, storing it in the database, and then reading the data to the rich text for display, I found a display error in the data in the database The place where the content is a space becomes </br>, and then when it is displayed in the rich text, a display error occurs

After investigation, it is found that a jsonUtil tool converts spaces into </br> when converting data. . .

The reason is: after
Insert picture description here
changing it to a new jsonUtil for rich text:
Insert picture description here
Insert picture description here
successfully solve the problem of rich text display

Published 111 original articles · won praise 2 · Views 3533

Guess you like

Origin blog.csdn.net/m0_38088647/article/details/103431194