wjm at wjm.org
Wed Oct 11 18:14:24 EDT 2006
Well, HTML is always supposed to begin with <HTML> and end with </HTML>.
But, if you're talking about Rev html-esque fragments, they don't follow the
rule above. However, theHTMLtext of a field always begins with <p> and ends
with </p> even if the content of the field is blank (and even if you set
theHTMLtext of the field to "<html>stuff</html>").
I suppose that you could say something like:
If "<p>" & the text of fld 1 & "</p>" = theHTMLtext of fld 1 then
-- it's not formatted
-- it's formatted
Is that what you're looking for?
> Does anyone have a simple piece of code to detect if
> some text contains html tags ?
> I thought of maintening a list of all possible html tags
> and chacking if the text contains any of them, but I
> have the feeling that there might be a simpler and / or
> more elegant solution...
More information about the use-livecode