Re: [Q] mail() & security

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris W. Parker wrote:

It seems as if strip_tags strip out everything that htmlentities would
change and would therefore be unnecessary.


strip_tags() and htmlentities() both perform seperate functions (hence
they have different names). htmlentities() encodes special characters,
strip_tags() strips HTML from a string. One example is the following:

Original: <b>&</b>

With strip_tags applied: &

With htmlentities applied: &amp;

It may or may not be necessary for you.

What dangerous/annoying things might happen if I did not pass the text intended for the body parameter of the mail function through htmlentities? (But, did pass it through strip_tags)


I cannot come up with anything.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux