Results 1 to 7 of 7
Thread: [php] Stripping html characters
Hybrid View
-
April 15th, 2004, 01:03 PM #1
[php] Stripping html characters
Hey everyone,
I'm adding a comment form to my blog, but I don't want people to be able to break my blog by entering html or php or any other code. So I need to know if there is a function that converts special characters such as < or > or / etc. into their form that's like &whatever;
I hope that made sense, I don't know the proper words for some of the things I was talking about so that might have been hard to follow.
I guess if I really have to I can just do a str_replace on < and > but I'd like to know if there's a more effective way.
Thanks
-
April 15th, 2004, 01:14 PM #24,029home cooking is killing the restaurant industry
postshttp://php.net/htmlentities
Originally Posted by xxviii
or maybe http://php.net/strip_tags might work as well..There are only 10 kinds of people in this world:
Those that might know ternary, those that do, and those that don't
Say NO to DRM.
-
April 15th, 2004, 01:15 PM #3
look at the examples here:
http://www.php.net/manual/en/function.preg-replace.php
-
April 15th, 2004, 01:46 PM #4
thank you very much both of y'all
I'll check it out later tonigh
-
April 18th, 2004, 03:40 PM #5
Last edited by Jeff Wheeler; April 18th, 2004 at 03:44 PM.
-
April 18th, 2004, 03:53 PM #6
thanks, I already got what I needed though. Thanks anyway though
-
April 18th, 2004, 04:25 PM #7
your welcome

Reply With Quote



Bookmarks