[Seaside] Re: liveCallback and SUAutocompleter

Lukas Renggli renggli at gmail.com
Wed Nov 22 09:34:01 UTC 2006

> > > > 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 ']]>'

Yes, that special thing of encoding will be tackled as soon as someone
is complaining. Different encoding within different parts of the
resulting page is something that is neglected right now, you can only
choose between no-encoding or HTML encoding. Looks like a project to
properly implement the different encodings for URLs, Scripts, CSS,
Attributes, etc.

The attached script is a good start to play around with these encoding
issues (in the context of scripts for now). It should dispay 3 alert
boxes with the string "done ...", should not raise warnings/errors and
should validate.

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

Yeah, text/xml breaks almost all applications as Web browsers get very
picky and display all kinds of warnings and errors.


Lukas Renggli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WAScriptEncodingTest.st
Type: application/octet-stream
Size: 1482 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061122/aaf8139e/WAScriptEncodingTest.obj

More information about the Seaside mailing list