Stripping html tags (was Re: Problem with revExecuteSQL - More)
Andre Garzia
andre at andregarzia.com
Fri Nov 2 12:32:41 EDT 2007
Richard,
doesn't that function makes you loose markup that is not displayed by
rev implementation of htmltext. For example, if you have <DIV> tag
that is not understood by htmltext, do you still get its content when
querying the text of the field?
I don't know...
Andre
On 11/2/07, Richard Gaskin <ambassador at fourthworld.com> wrote:
> Dave wrote:
> > Yes, I'm sure thats the function we were talking about!
> >
> > Where can I get it from?
>
> I don't know where that one resides, but when I need to strip HTML tags
> from text I just set the htmlText of a field and then get the text of
> that field.
>
> Ken Ray recently discovered this works with the templateField as well,
> so you don't need to rely on a physical field to do this:
>
> function html2text pHtml
> put the htmlText of the templateField into tSaveData
> set the htmlText of the templateField to pHtml
> get the text of the templateField
> set the htmlText of the templateField to tSaveData
> return it
> end html2Text
>
>
> --
> Richard Gaskin
> Managing Editor, revJournal
> _______________________________________________________
> Rev tips, tutorials and more: http://www.revJournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
--
http://www.andregarzia.com All We Do Is Code.
More information about the use-livecode
mailing list