strip_tags() function removes all html tags from the text. I basically do not mind using them on my forum, but I don’t want php code to be used in messages. Is it possible to get rid of the
<? ?> with content?
echo preg_replace('#<\?(|php)([\s\S]*)\?>#i', '', file_get_contents('index.php'));
What's the point?
PHP code and so will not run.
The content field that is sent to the server is a string. And this string is processed, so that it does not exist, just like a string.
I used my idea: I added all tags used by the editor to strip_tags (). Thank you for your responsiveness.