--- Didier McGillis <[EMAIL PROTECTED]> wrote:
> I am doing an admin site for a person and their small site.
> I need to allow them to put in paragraphs of information. I
> am allowing them to put in some HTML like <b>, <br>, <p>
> <a href=""> a very limited amout of tags. What is the best
> way to submit and then show this information to make sure
> that bad tags, characters ad quotes dont mess up the code
> when displaying it.

If I understand your question correctly, htmlentities() is all you need to
display HTML exactly as it was entered. For only allowing specific ones to be
interpreted, you can perform str_replace() operations. For example:

str_replace('&lt;b&gt;', '<b>', $blah);
str_replace('&lt;/b&gt;', '</b>', $blah);

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to