Skip to content

Binding in Velocity templates using EL accessors ([, ]) for collections produces non xhtml strict compliant output [SPR-5172] #9845

@spring-projects-issues

Description

@spring-projects-issues

David Mas opened SPR-5172 and commented

When the springBind macro is called, then the generated XHTML contains the bound path on the ID of the HTML element. If the bound property contains some EL syntax to access collections (e.g. uses [] to access a map) these characters will appear on the ID attribute.
According to XHTML strict, the ID must be a NCNAME (see http://www.w3.org/TR/REC-xml-names/#NT-NCName), which does not allow these characters among others.

The solution does not look obvious to me, but maybe some mechanism to escape the ID in these cases or to alias them could work.


Affects: 4.0.6

Issue Links:

Referenced from: commits 1b53882

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions