Skip to content

Qute: tag parameters from outer space #21861

Open
@FroMage

Description

Describe the bug

This one is funky:

test.html:

Class: {class}<br/>
Size: {size}

Usage: {#test class="myclass"/}

Result:

Class: class io.quarkus.qute.Mapper$1
Size: 3

So… I can't use the class parameter name, I need to use klass in order to be able to pass my values. And for some reason, if I don't specify a size parameter on the call site, the tag still has a value for it, so it can't test whether it was passed or not with size?? and it appears pretty random from the PoV of the user.

I know @mkouba told me there's a place where this size comes from, and there might be other reserved parameter names that are tricky like this, but we should probably remove them because they can really clash with what the user is doing. Unless there's a good reason for them existing?

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Assignees

No one assigned

    Labels

    area/quteThe template enginekind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions