Skip to content

Unquoted named parameter in shortcode allows for non-alphanumeric values #13343

Open
@guilhas07

Description

@guilhas07

Problem

Named and unnamed parameters in shortcodes support different characters.

Example

This is currently allowed:

{{< foo param=https://example.ork/foo/?a=b&c=d#bar >}}

This fails with unrecognized character in shortcode action: U+003A ':'. Note: Parameters with non-alphanumeric args must be quoted:

{{< foo https://example.ork/foo/?a=b&c=d#bar >}}

Given the error message, I believe the first example should error with the same message.
I previously opened #13342 which contains the fix for this, let me know if I should reopen it.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.143.1+extended linux/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions