[Zope] Re: HTML post processing in Zope
Tom Payne
tom at sharedbase.com
Tue May 24 05:28:31 EDT 2005
Hi there,
I only joined up a few weeks ago, so I missed the beginning of the
thread, but I just thought I'd let you know that the __ac_name and
__ac_password don't stop your page from validating. I thought this may
be a HTML 4.01 quirk (it's been a while...) so I tested it on a dummy
page and it validates fine. I'll enclose the html at the end of this.
One thing that it could be is if you give your input fields the same id
as the name attribute - it would very probably "unvalidate" it. IDs are
much more specific: you can't start one with a number either...
The good news is, you don't have to use this __ac_nonsense as the id -
I use "username" and "password" and it works very nicely (and it's
easier for other people to read). I actually just use a plain
exUserFolder, rather than Plone, but it uses the same form variables,
so I assume it's similar.
Cheers,
Tom
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Log in test page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<div style="display: none;"><a href="#maincontent">Skip
navigation</a></div>
<div id="login">
<a href="loginform" onclick="openLoginBox(); return false;"
title="click here to login" id="loginexpander"><img
src="images/Plus_icon.gif" alt="log in" id="loginicon"><span
class="loginlink">LOG IN</span></a>
<div id="loginbox">
<form action="login" method="post">
<div>
<label for="username">Username</label><br>
<input type="text" name="__ac_name" id="username"><br>
<label for="password">Password</label><br>
<input type="password" name="__ac_password" id="password"><br>
<input type="submit" name="login_submit" value=" Log In "><br>
</div>
</form>
<div id="loginlinks">
<a href="#">lost password?</a><br>
<a href="#">find out more</a><br>
<a href="#">join now</a><br>
</div>
</div>
</div>
<div>
Praedium quod primum siet, si me rogabis, sic dicam: de omnibus agris
optimoque loco iugera agri centum, vinea est prima, vel si vino multo
est. secundo loco hortus irriguus. tertio salictum. quarto oletum.
quinto pratum. sexto campus frumentarius. septimo silva caedua. octavo
arbustum. nono glandaria silva.</div>
</body>
</html>
On 23 May 2005, at 22:20, Cyrille Bonnet wrote:
> Hi Chris,
>
> Well, you'd better believe it :-)
>
> It works for me so far. But if you have specific examples that I can
> use to improve the filter, they would be very welcome.
>
> Two additional things that I had to do to be HTML 4.01 compliant:
>
> * replace <html ...> with <html> (remove the namespace information)
> * remove the login portlet: Plone uses form parameters __ac_name and
> __ac_password, which the W3C validator rejects as invalid.
>
> <snip>
More information about the Zope
mailing list