Jump to content

Html To Plain Text


Distortion
 Share

Recommended Posts

On my website people should be able to send short messages to eachother, but they shouldn't be able to add links or other things with html.I tried converting the input text with strip_tags(); and nl2br(); but this has the disadvantage that innocent things like <Distortion> get deleted as well.Best would be if I could convert the message when it is send to plain text, because maybe I want to use automatic messages that can contain html. Next best is to simply stop the displayed string from being executed as html.Any ideas how to do this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...