thinkphp integrated Ueditor, when the content in the DB, when the page rendering, why not syntax highlighting?
The beginning of the JS, CSS are introduced.
TP in DB does not seem to be the real HTML content of UE, this is the core problem, how should be solved?
The red circle is the content of the UE that is saved into DB by the browser.
Here is the Web page source code:
Reply content:
thinkphp integrated Ueditor, when the content in the DB, when the page rendering, why not syntax highlighting?
The beginning of the JS, CSS are introduced.
TP in DB does not seem to be the real HTML content of UE, this is the core problem, how should be solved?
The red circle is the content of the UE that is saved into DB by the browser.
Here is the Web page source code:
Need to be escaped before database is saved
$content = I('post.content');$content = htmlspecialchars_decode($content);
You're supposed to be using the I function, re-escaping the line as if it were htmldecoude. Tangible wealth