After the input in the editor is submitted, when it is output, the items with
in the view table are all entities.
Solution: Just convert the content before output.
htmlspecialchars_decode()
If you need more details, please read the following:
When using the UEditor editor to save the article content in ThinkPHP 3.2.2, the data saved in the database is Escaped to entities, for example:
fonts& ;gt;
Pictured:
Then if you are preparing to edit the saved data in the background, if you do not do the corresponding processing, the edit box will appear:
Just need to remove it The data will be processed accordingly:
$con['content'] = htmlspecialchars_decode(html_entity_decode($con['content']));
then the edit box will be correct Display the saved data:
Attachment:
html_entity_decode(): Converts HTML entities into characters, which is the inverse function of htmlentities().
htmlspecialchars_decode(): Convert some predefined HTML entities into characters.
If the html code of
The above is the detailed content of Detailed explanation of html entity conversion UEditor editor method. For more information, please follow other related articles on the PHP Chinese website!