Hello,
I was wondering about the strip_tags() command in PHP. It seems to strip absolutely everything that begins with a <. For example:
<bob> - gone
<bob - gone
what's up> -stays (common typo btw)
Is there any way for it to strip only HTML tags, as opposed to random stuff like <bob>?
Thanks!
strip_tags()
Moderator: General Moderators
- evilmonkey
- Forum Regular
- Posts: 823
- Joined: Sun Oct 06, 2002 1:24 pm
- Location: Toronto, Canada
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
As you noticed, strip_tags() strips anything that may be a tag, it doesn't consider HTML vs XML vs XYZ.
viewtopic.php?t=45984
viewtopic.php?t=45984