Why does the content submitted by the rich text editor display the code on the page?

if the picture above is filled in with formatted text, and the console below is the submitted rich text HTML;
is there any problem with this step?

-
/ / this paragraph is truncated from my page. Why is it displayed like this? all the format codes are brought out

.
<br\/>< img src=\"http:\/\//\//\/ou5331fwu.bkt.clouddn.com\/p2\/p2\/m\/m\/p20uyn5gz9e.jpg\" i\" i\" id=\"http:\/\//\//\/ou5331fwu.bkt.clouddn.com\/p2\/p2\/m\/m\/p20uyn5gz9e.jpg\" s\" s\" style=\"margin: .5rem 0; width: 100%;\"><br\/>18
Jun.29,2021

if it is vue, it will be displayed like this directly through {{msg}}, for security reasons. If you have to parse html, use v-html

<p class="paragraph" v-html="formatRules">

react uses < div dangerouslySetInnerHTML= {{_ html:' test '}} > < / div >


has been escaped. How did you get it, or what plug-ins did you use?


when rendering, just press html to parse, instead of parsing ~


console, do you print the returned results directly? If so, it will naturally print out his content directly, because it is already a string, and if it is printed directly, it must be in the form of a string,

.
Menu