remove html tags from text
JimAultWins at yahoo.com
Fri Sep 8 10:07:16 CDT 2006
I would add a loop to clean up the formatting of the returned text, since
html formatting is usually done for the convenience of the programmer, not
On 9/8/06 6:10 AM, "Mark Smith" <mark at maseurope.net> wrote:
> barely tested, but maybe a starting point:
> function striptags tHtml
> replace cr with empty in tHtml -- in case of multi-line tags
> replace "<" with cr & "<" in tHtml
> replace ">" with ">" & cr in tHtml
> filter tHtml without "*<*"
> filter tHtml without "*>*"
repeat for each line LNN in tHtml
put word 1 to -1 of LNN & cr after newHtml
filter newHtml without empty
-- now there are no leading/trailing spaces, no empty lines
replace cr with space in newHtml
--now there are no cr's, since you would not know where they should be if
--the tags are simply stripped.
--To get the paragraphs of an html page is tricky, since there are several
--tags and techniques for displaying blocks of text (<p><BR><td><span>)
> --return tHtml
> end striptags
> On 8 Sep 2006, at 13:52, paolo mazza wrote:
>> just a simple task for Revolution!
>> How can I remove html tags from text?
>> from: try <b> solve<b> this <<httpk.hhkjhlkjlljkl= hkjh> quiz </a>
>> to: try solve this quiz
>> I should use a wildcard but ....
>> filter TEXT with "<*>" does not work. It is only for a list.
>> I do not want to put the Text in a field and use the HtmlText.
>> Paolo Mazza
>> Paolo Mazza
>> NEOL SRL
>> Via Calatafimi, 16 - 35137 PADOVA
>> www.neol.it paolo.mazza at neol.it
>> Tel 049-7386590
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the use-livecode