[Laszlo-dev] <text> vs. html

Henry Minsky hminsky at laszlosystems.com
Tue Nov 11 12:08:25 PST 2008


I think the text content is always treated as HTML when the text field
displays it.

We had *inputtext* have a special case where it escaped it for you,
because swf5 couldn't handle
HTML directives in it's text field.  Maybe that's what you're remembering...

And yes, it sucks to have to escape this. I think you would need to
escape it twice actually if you
wrote it out in lzx, once for the lzx parser, and once for the TextField object.

<text text="&amp;lt;text&amp;gt;">

On Tue, Nov 11, 2008 at 12:36 PM, P T Withington <ptw at pobox.com> wrote:
> I am confused.
>
> If I say:
>
>  <text text="<testing>" />
>
> I see nothing.
>
> I _thought_ I remembered that if you wanted to write html into a text node,
> you would set the `html` attribute and that setting the `text` attribute
> would, by default, not interpret `<` as html.  Did I imagine this?  Or just
> confuse our text nodes with those of HTML?
>
> It seems really sad to me that I have to say:
>
>  <text text="${this.escapeText('<testing>')}" />
>
> to make it work.  Also, `escapeText` is a terrible name (since it is really
> escaping XML, not text).
>
> Can we fix this, or are there actually legacy programs that depend on
> writing html markup into <text>?  I would think if you wanted to write html
> markup, you ought to be using the <html> tag?
>



-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com


More information about the Laszlo-dev mailing list