mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
f34cdc382a
Previously, the XML decoder would panic when encountering a root element with a non-map value due to an unsafe type assertion. The fix adds proper type checking before the map conversion and provides clear error messages to help users identify and fix invalid XML structures. Example error for invalid XML like: <root>just text</root> Will now return: "XML root element 'root' must be a map/object, got string"