I just want to use php to strip tags I have other tags such as images and links After that I worked in the strip tag function in PHP but it starts touching all the tags and it is not going to work in my case. Is it enough to prevent any security problems by pushing tags from text?
Supports putting some tags in the whitelist, so that you only use it to allow the necessary html tags Can do for you. I will sanitize the entire string, however, as though the zariikams suggest, is not able to write the HTML code to users.
If you want to enable users to markup your data, then use only Markdown or a similar uproot.
Comments
Post a Comment