[Seaside] Re: liveCallback and SUAutocompleter

Philippe Marschall philippe.marschall at gmail.com
Wed Nov 22 09:17:28 UTC 2006


2006/11/22, Lukas Renggli <renggli at gmail.com>:
> > > The only thing I found out was that a script that has the & encoded as
> > > &amp; doesn't work within a <script>,
> >
> > This is really strange.
>
> Yes, agreed. Feel free to try it out yourself.

If it wasn't you I wouldn't believe it until I tried it.
Digging deeper there is CDATA and PCDATA in html :(
Not to be confused with <![CDATA[

> > > but does within an attribute
> > > value. JavaScript code only works in a <script> when the contents is
> > > not encoded, but this turns the XHTML invalid if the contents is not
> > > within a CDATA construct. The CDATA construct should not harm any
> > > browser that does not understand it, so what is your aversion against
> > > it except that you don't like it?
> >
> > CDATA is not part of HTML. It's part of XML and we serve as text/html
> > which means it gets treated as HTML. It's just plain wrong.
>
> So what? Luckily there is a Javascript comment around the CDATA so
> non-xml parsers still handle it properly.

Ah, I missed this point completly. This changes a lot. Acutally this
addresses everything but a script that contains ']]>'

> Maybe then the mime-type of
> responses should be changed to text/xml, this would be more consistent
> anyway?
>
> > Second, it breaks as soon as somewhere in a script is ']]>' lets say
> > for XML parsing or whatever. For the person this happens this will
> > mean real pain. It's not a solution, it just appears to works in some
> > cases.
>
> Please find a better solution that works instead of only complaining.

Yeah I know. And if I have a problem with the VM I should just stfu and fix it.

All I can think of right now would break on html parsers.

Philippe


More information about the Seaside mailing list