Skip to content

FormTag generates hidden fields from RequestDataValueProcessor.getExtraHiddenFields(...) without container, resulting in invalid xhtml [SPR-10926] #15554

@spring-projects-issues

Description

@spring-projects-issues

Thorsten Vogel opened SPR-10926 and commented

When specifying extra hidden fields in a RequestDataValueProcessor, the resulting markup is invalid according to the W3C validator. We are using XHTML 1.0 Strict.

It would be great if the FormTag.writeHiddenFields(...) method could optionally generate a container around the fields (e.g. div or a configurable container).

Resulting markup:

...
    <input type="hidden" name="_token" value="xyz" />
</form>

Expected for compliancy:

...
    <div>
        <input type="hidden" name="_token" value="xyz" />
    </div>
</form>

Affects: 3.2.4

Issue Links:

Referenced from: commits b5bd4d8

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions