The issue here is NOT that I'm trying to strip tags, but rather to KEEP tags in an input stream tags but use htmlspecialchars on everything else.
The following examples assume the following input:
$var="this is <BR> something that </table> I like, because 1 < 2";
I can use striptags something like this
$var=striptags($var, "BR");
and keep the BR, stripping out the nasty /table tag. So, all's well there, and I keep the page layout safe. But...
If I want to use htmlspecialschars to preserve the "1 < 2" sequence, I then lose the use of the BR tag... it's rendered on screen rather than used.
And, THATs the problem I want to solve - use htmlspecialchars so that I can see less than/greater than signs and others of its ilk but still keep actual HTML tags in use.
-Ben