RE: [Zope] Zope 2.7.2 breaks Plone 2.0.3 login_form
Fred Drake
And still another is to split your string literals where they look like markup, because even CDATA marked sections aren't meant to protect you from everything. Try changing the line with the </a> to
href="enabling_cookies">How to enable cookies<' + '/a>.<' + '/div>');
and the problem should go away.
It's probably not quite that CDATA sections "aren't meant to protect you from everything." They _are_, at least in xml (where everything means "<" and "&"). Chances are that the browser here is getting an HTML file, or at least thinks it is, and HTML does not really know about CDATA sections. I also have sometimes had to break up my string literals to prevent this kind of problem (not with Plone, but in other applications). It's probably better to build the string outside of the document.write(), too. Cheers, Tom P
On Fri, 23 Jul 2004 15:15:50 -0400, Passin, Tom <tpassin@mitretek.org> wrote:
It's probably not quite that CDATA sections "aren't meant to protect you from everything." They _are_, at least in xml (where everything means "<" and "&"). Chances are that the browser here is getting an HTML file, or at least thinks it is, and HTML does not really know about CDATA sections.
Hey Tom! This is definately for text/html and not any sort of XML, which uses a different parser. The problem here isn't in the browser; it's a matter of how the HTMLParser module from Python's standard library is treating the "</" pair. As I read it, even in a CDATA marked section, "</" is supposed to be recognized as a "delimiter in context." HTMLParser is doing exactly that, but HTML authors are not accustomed to parsers that are more strict than those found in browsers. Thus, this sort of confusion can arise, and especially so when a more browser-like parser was being used to begin with. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> Zope Corporation
participants (2)
-
Fred Drake -
Passin, Tom