#2409 incorrect form element produced

closed-fixed
5
2007-01-06
2007-01-05
Roger Henry
No

Squirrelmail 1.4.8-2.el4.centos4
dovecot 0.99.11-4.EL4
Apache 1.0.52-28.ent.centos4
PHP 4.3.9-3.18

I discovered this as a result of setting up an Apache-based reverse proxy to a Squirrelmail system. When accessed through the reverse proxy, none of the Move, Forward, Read, Unread, Delete actions have any effect - making it less than fully functional.

The problem is that Squirrelmail does not produce form elements correctly nested within other elements. The reverse proxy, in attempting to process this, adds a </form> before any of the above input elements are reached. The result is that these input elements do not appear withing a form element and so are not actioned by the browser.

I confirmed the problem with the HTML generated by Sqirrelmail by submitting it to HTMLTidy which produced the following output on the attached example input:

line 76 column 72 - Warning: missing </form>
line 128 column 91 - Warning: unescaped & or unknown entity "&startMessage"
line 133 column 1 - Warning: discarding unexpected </td>
line 133 column 6 - Warning: discarding unexpected </tr>
line 277 column 1 - Warning: discarding unexpected </td>
line 277 column 6 - Warning: discarding unexpected </tr>
line 295 column 11 - Error: discarding unexpected </form>
line 296 column 1 - Error: discarding unexpected </td>
line 296 column 6 - Error: discarding unexpected </tr>
line 47 column 1 - Warning: <table> lacks "summary" attribute
line 76 column 1 - Warning: <table> lacks "summary" attribute
line 81 column 1 - Warning: <table> lacks "summary" attribute
line 81 column 104 - Warning: <table> lacks "summary" attribute
line 102 column 1 - Warning: <table> lacks "summary" attribute
line 103 column 9 - Warning: <table> lacks "summary" attribute
line 133 column 70 - Warning: <table> lacks "summary" attribute
line 133 column 186 - Warning: <table> lacks "summary" attribute
line 277 column 104 - Warning: <table> lacks "summary" attribute
line 277 column 194 - Warning: <table> lacks "summary" attribute
Info: Doctype given is "-//W3C//DTD HTML 4.01 Transitional//EN"
Info: Document content looks like HTML 4.01 Transitional
Info: No system identifier in emitted doctype
16 warnings, 3 errors were found!

This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.

You may need to move one or both of the <form> and </form>
tags. HTML elements should be properly nested and form elements
are no exception. For instance you should not place the <form>
in one table cell and the </form> in another. If the <form> is
placed before a table, the </form> cannot be placed inside the
table! Note that one form can't be nested inside another!

Regards

Roger Henry
rhenry-silkhill@users.sourceforge.net

Discussion

  • Roger Henry
    Roger Henry
    2007-01-05

    HTML source of right main page with incorrectly nested form element

     
    • assigned_to: nobody --> kink
     
  • Logged In: YES
    user_id=285765
    Originator: NO

    Thanks, I will check it out.

     
  • Logged In: YES
    user_id=285765
    Originator: NO

    Fixed in CVS, thanks!

     
    • status: open --> closed-fixed
     
  • Roger Henry
    Roger Henry
    2007-01-06

    Logged In: YES
    user_id=1684238
    Originator: YES

    Many thanks for the quick response

    Roger