Possible bug with urls.Parse or parameter passing? Or am I doing something silly?

I’m currently seeing what is either a strange bug, or I’m mis-understanding something fundamental with Hugo:

{{$url := .Params.actionUrl}}
{{ (urls.Parse $url).Host }} --- this outputs the host as expected
{{ (urls.Parse .Params.actionUrl).Host }} ---- this outputs an empty string

If I call jsonify on the return object of urls.Parse, the output is identical for both cases.

Would you expect that behaviour? Or should I try and create a repro? I’m on hugo v0.58.2/extended

What’s behind actionUrl?


The rawurl may be relative (a path, without a host) or absolute (starting with a scheme). Trying to parse a hostname and path without a scheme is invalid but may not necessarily return an error, due to parsing ambiguities.