Why are my “
” tags getting converted to “
”?

后端 未结 5 2134
Happy的楠姐
Happy的楠姐 2020-12-31 16:05

I have HTML data stored in database which I wish to display as is. It keeps converting
tags to <br /> which is a behavior I do not want. I

5条回答
  •  醉话见心
    2020-12-31 16:34

    Presumably because when you are inserting it into the DOM, you are inserting it as text and not as HTML.

    Since you haven't show the code you are using to do that, it is hard to say for sure, or to say what the best way to change it so it expects HTML would be.

提交回复
热议问题