[Zope-dev] <base href="..."> not being set under some circumstances

Jim Fulton jim@digicool.com
Sun, 03 Sep 2000 11:25:37 -0400


Steve Alexander wrote:
> 
> Zope 2.2.1
> 
> Zope is not setting the <base> tag in the html header under some
> circumstances.
> 
> To get a reproducable example of this, create a folder "test" under the
> zope root object.
> 
> Inside "test" create a new dtml document called "body_html". Leave the
> content of body_html as the default.
> 
> Now, view the page, and view its source. You'll see no <base> element.
> 
> Is this intentional?

Yes. This should be a FAQ.

> Does Zope now not bother with the body element if
> it doesn't think it is needed?

Yes.

> This would seem to be the rationale
> behind the request attribute "request._hacked_path".
> 
> Comments?

This is needed because sometimes Zope does hack the path,
for example when index_html or :method form types are used.
The base href is needed in these cases to make sure that
relative URLs are treated correctly.

Jim


--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.