I use a field to strip my HTML. I just put it in the htmlText of a hidden
field and then get the text of that filed and all HTML tags are
conveniently gone...
That doesn't help Chipp, but is a short two-liner replacement for Ken's
algorithm.
At 01:31 PM 1/26/2007, you wrote:
On Fri, 26 Jan 2007 12:56:36 -0600, Chipp Walters wrote:
> function stripAllTagsBut pHtml,pTagsList
> --> pTagsList IS A LIST OF TAGS NOT TO EXCLUDE FROM PARSING
> --> EX. LINE 1 OF pTagsList CAN BE "img" AND LINE 2 CAN BE "b", etc..
>
>
> It's used to strip all tags from HTML but those in the pTagsList parameter.
>
> IOW, it can be used to grab the HTML of a page, and strip everything
but the
> img tags.
>
> I'm starting to write it, but thought I'd ask-- just in case.
Closest thing I have is:
function stsStripHTML what
put replaceText(what,"(?si)<script.*?/script>","") into what
put replaceText(what,"(?si)<style.*?/style>","") into what
put replaceText(what,"<.*?>","") into what
put replaceText(what,tab,"") into what
put replaceText(what,CR & "{3,}","") into what
return what
end stsStripHTML
But this strips all tags...
Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution