[thelist] RE: Function to strip HTML in ASP

Stevens Jan STEVENSJ at epa.nsw.gov.au
Tue Jul 11 22:34:02 CDT 2000


This is a javascript from HTML goodies, I don't know if that will work in
ASP http://htmlgoodies.earthweb.com/stips/scripttip79.html
Jes

	----- Adrian wrote:

	>have you tried Server.HTMLEncode(strWebPage)  ? 
	>or even do a replace on < and >... 

	I'm aware of this function of course and use it routinely to prevent
	someone trying to get malicious code to execute in message boards
and
	the like.

	But this is not what I want to do.

	I want a way to take the following text:

	<i>John Doe</i>, President, said <b> blah blah blah important stuff
	</b>

	and turn it into:

	John Doe, President, said blah blah blah important stuff 

	I.e, get rid of all the HTML formatting. A possible use of something
	like this would be in getting a "printable version" of an article.




More information about the thelist mailing list