When you use the Ueditor Editor to save article content in thinkphp 3.2.2, the data that is saved in the database is escaped to entities, such as:<p><strong> <span style="font-family: Microsoft ya Black, & #39; Microsoft yahei& #39;; Color:rgb (192, 0, 0); "><em><span style=" font-family: Microsoft Ya-Black, & #39; Microsoft yahei& #39;; text-decoration:underline;">fonts</span></em& Gt;</span></strong></p>
The data that is actually deposited is:
If you are ready to edit the saved data in the background, if you do not do the appropriate processing, the edit box will appear:
You only need to handle the data when it is taken:
$con Htmlspecialchars_decode (html_entity_decode($con[' content ')]);
The saved data is displayed correctly in the edit box:
Report:
Html_entity_decode (): Converts an HTML entity to a character, which is an inverse of the htmlentities ().
Htmlspecialchars_decode (): Converts some pre-defined HTML entities to characters.
HTML entity converted to character: Convert Ueditor editor (in thinkphp 3.2.2) saved data