You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
guilhas07
changed the title
Unquotted named parameter in shortcode allows for unicode values
Unquotted named parameter in shortcode allows for non-alphanumeric values
Feb 4, 2025
bep
changed the title
Unquotted named parameter in shortcode allows for non-alphanumeric values
Unquoted named parameter in shortcode allows for non-alphanumeric values
Feb 4, 2025
I previously opened #13342 which contains the fix for this, let me know if I should reopen it.
No, that's not the fix (it would break sites). I'm not sure about this, will think, maybe we just adjust the error message. Will think about it.
Another option would be to allow both, making this
{{< foo https://example.ork/foo/?a=b&c=d#bar >}}
valid, and instead of consuming until space in the named case, in both situations, consume until an end tag or space is found.
Resulting in the following consistent behaviour:
// Would become valid (Currently fails)
{{< foo param=example>}}
// Already Valid
{{< foo example>}}
Problem
Named and unnamed parameters in shortcodes support different characters.
Example
This is currently allowed:
This fails with
unrecognized character in shortcode action: U+003A ':'. Note: Parameters with non-alphanumeric args must be quoted
: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
)?Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: