PHP - remove HTML tags from a string except for <img>
1 answer
Yes to remove tags.
But strip_tags()it will not help against the most dangerous thing - XSS . You will need some regular expression or use http://htmlpurifier.org/ to make sure that the tag <img>does not have any unwanted parameters.
+10