remove html tags from text

Jim Ault JimAultWins at yahoo.com
Sun Sep 10 14:04:33 EDT 2006


Richard,

Is the white space a " " in the html, or a   that appears to be a
space?
> <pre>
> put 2<3  |   put 2< 3    |   put 2< 3
> </pre>


Jim Ault
Las Vagas


On 9/10/06 10:55 AM, "Richard Gaskin" <ambassador at fourthworld.com> wrote:

> Mark Smith wrote:
>> On 10 Sep 2006, at 16:26, Richard Gaskin wrote:
>> 
>>> So until someone can demonstrate otherwise, I'm sticking with using
>>> fields to strip tags from text.....
>> 
>> Though doesn't this approach fail with legitimate "<" characters in
>> <code>  (or other) tags?
>> 
>> Of course, that may not be important in your usage.
> 
> It's very important for most of us, since we're looking for the most
> robust solution.
> 
> I just tried it and found that this:
> 
> <pre>
> put 2<3
> </pre>
> 
> ...produces an incomplete rendering like this:
> 
>    put 2
> 
> ...but this:
> 
> <pre>
> put 2< 3
> </pre>
> 
> ...is rendered as expected like this:
> 
> put 2< 3
> 
> 
> I would imagine similar results if we special-case the regex solution to
> also handle non-white space after a "<".
> 
> If both methods are equally robust then the one to use would be the
> fastest.  But if one of more fault-tolerant than the other, than if the
> speed of both is at least acceptable than I'd go with the more robust one.





More information about the use-livecode mailing list