Carlana
Carlana
Here's a different crash, I think caused by moving a file around: ``` Change detected, rebuilding site. 2022-09-16 20:07:42.050 -0400 Source changed "/Users/adhoc/src/spl/poor-richard/content/elections.md": CREATE ERROR 2022/09/16 20:07:47 Rebuild failed: "/Users/adhoc/src/spl/poor-richard/content/news/2022-02-21-SPLCANNABIS21.md:123:1":...
``` panic: html/template: cannot Clone "" after it has executed goroutine 2768 [running]: github.com/gohugoio/hugo/tpl/internal/go_templates/htmltemplate.Must(...) github.com/gohugoio/hugo/tpl/internal/go_templates/htmltemplate/template.go:375 github.com/gohugoio/hugo/tpl/tplimpl.(*templateNamespace).createPrototypes(0xc043f50ab0) github.com/gohugoio/hugo/tpl/tplimpl/template.go:985 +0xab github.com/gohugoio/hugo/tpl/tplimpl.(*templateExec).MarkReady.func1() github.com/gohugoio/hugo/tpl/tplimpl/template.go:311 +0x45 sync.(*Once).doSlow(0x40131dd?, 0x7c01d28?) sync/once.go:74 +0xc2 sync.(*Once).Do(...) sync/once.go:65 github.com/gohugoio/hugo/tpl/tplimpl.(*templateExec).MarkReady(0x4000?) github.com/gohugoio/hugo/tpl/tplimpl/template.go:308 +0x65...
> I think it may have missed Go 1.18 by 5 days For the record, even though Go 1.18 shipped in March, the feature freeze for it was back in...
The proposed change won't work because `this.page` in the original script is part of `window.disqus_config` which is missing in the changed version. I think it can be fixed, but the...
Oh, also `Clone` needs to be updated if you use a map.
I think this should wait until there's a negative resolution of #21670 / #25860 / #47487.
ISTM, most (all?) cases where you would want to use this involve os paths (since an fs.FS is rooted anyway) and joining to a base. I'm not sure when you...
> It should be an error if it escapes, regardless of how it does so. But `SafeJoin("/a", "/a/b")` should work fine. What if the base directory is a secret for...
Good summary. My preference is for SafeJoin. It feels like the more common case to me, and the names "Sanitize" vs. "Clean" are too similar and easy to get backwards.
I am in favor of allowing only the `return ..., x` form. If other forms are good, they could be added later. The main benefit of this for me is...