Re: [NEWBIE] How to allow for <a href> tags but no others?

From: Date: Sat, 26 Feb 2005 03:27:04 +0000
Subject: Re: [NEWBIE] How to allow for <a href> tags but no others?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-209486@lists.php.net to get a copy of this message
Alberto, John, Jochem, Richard, Tyler, Thank you for your very helpful advice. So far I'm thinking of definitely including some of Tyler's code for doing some filtering, along with the other commands mentioned, like strip_tags() for securing the input. However, I would like to ask further about what Alberto was talking about in terms of storing the url separately. Someone mentioned that "Chris" suggested making my own syntax, but I somehow the response from Chris didn't get to me, so I'm not sure what that implies. Without a doubt, it would be better to save the URL separately, and then refuse any other user attempts at hand coded HTML. But the problem that I can't quite resolve is how to get separately stored URLs into inline text in such a way that a non-HTML literate user could handle. Right now I offer the user the option of saving a web link with a title separately from the block of text. They can create a user profile which looks like this: http://www.tokyocomedy.com/people.php?person=7 (Page has Japanese text) But that's not quite satisfactory. I'm trying to give people the option of having profiles that look like this: http://www.tokyocomedy.com/people.php?person=11 (Page has Japanese text) I can set up the form for users to input multiple URLs, but how can I then allow them to place them in the desired location in their text? -- Dave Gutteridge dave@tokyocomedy.com

« previous php.general (#209486) next »