Home > Article > Backend Development > How to display video in php and escape other codes
I create a textarea
tag on the front page to submit content. Users can enter any content here, but I want to perform special processing on the following three types. What should I do?
<script>alert('hello')</script>,
<p style="color:#f00">hello world</p>, etc. are all output as they are on the page.
The backend language is php, how to write php, thank you!
Reply content:
textarea tag on the front page to submit content. Users can enter any content here, but I want to perform special processing on the following three types. What should I do?
, <p style="color:#f00">hello world</p>
, etc. are all output as they are on the page.
When re-editing, the content previously entered by the user is still displayed, not the converted content.
The backend language is php, how to write php, thank you!
If your level is low, you can only think of regular rules...