ThinkPHP integrates the Ueditor and stores the content in the DB. why can't the syntax be highlighted when the page is displayed? Js and css at the beginning are introduced. What TP stores in DB does not seem to be the real html content of UE. This is the core issue. How should we solve it? The red circle is resolved by the browser...
ThinkPHP integrates the Ueditor and stores the content in the DB. why can't the syntax be highlighted when the page is displayed?
Js and css at the beginning are introduced.
What TP stores in DB does not seem to be the real html content of UE. This is the core issue. How should we solve it?
Circled in red is the content of the UE in which the TP is stored in the DB as explained by the browser.
The source code of the webpage is as follows:
Reply content:
ThinkPHP integrates the Ueditor and stores the content in the DB. why can't the syntax be highlighted when the page is displayed?
Js and css at the beginning are introduced.
What TP stores in DB does not seem to be the real html content of UE. This is the core issue. How should we solve it?
Circled in red is the content of the UE in which the TP is stored in the DB as explained by the browser.
The source code of the webpage is as follows:
Escape before saving data to the database
$ Content = I ('Post. content'); $ content = htmlspecialchars_decode ($ content );
You should have used the I function and escaped it again, just like the specific wealth of htmldecoude.