diff options
author | Ralph Slooten <[email protected]> | 2020-09-09 20:25:31 +1200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-09-09 22:09:40 +0200 |
commit | 4b430d456afee9c6da5e5ab46084a05469be1430 (patch) | |
tree | ffbe9fd63eedf6a5b6944f91ca0f4a38819bf9dc /transform | |
parent | b9f10c75cb74c1976fbbf3d9e8dcdd4f3d46e790 (diff) | |
download | hugo-4b430d456afee9c6da5e5ab46084a05469be1430.tar.gz hugo-4b430d456afee9c6da5e5ab46084a05469be1430.zip |
Encode & in livereload injected code
Diffstat (limited to 'transform')
-rw-r--r-- | transform/livereloadinject/livereloadinject.go | 2 | ||||
-rw-r--r-- | transform/livereloadinject/livereloadinject_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/transform/livereloadinject/livereloadinject.go b/transform/livereloadinject/livereloadinject.go index bbafdff72..a6e56ac41 100644 --- a/transform/livereloadinject/livereloadinject.go +++ b/transform/livereloadinject/livereloadinject.go @@ -59,7 +59,7 @@ func New(port int) transform.Transformer { return err } - script := []byte(fmt.Sprintf(`<script src="/livereload.js?port=%d&mindelay=10&v=2" data-no-instant defer></script>`, port)) + script := []byte(fmt.Sprintf(`<script src="/livereload.js?port=%d&mindelay=10&v=2" data-no-instant defer></script>`, port)) i := idx if match.appendScript { diff --git a/transform/livereloadinject/livereloadinject_test.go b/transform/livereloadinject/livereloadinject_test.go index 690db31c2..59124f20b 100644 --- a/transform/livereloadinject/livereloadinject_test.go +++ b/transform/livereloadinject/livereloadinject_test.go @@ -25,7 +25,7 @@ import ( func TestLiveReloadInject(t *testing.T) { c := qt.New(t) - expectBase := `<script src="/livereload.js?port=1313&mindelay=10&v=2" data-no-instant defer></script>` + expectBase := `<script src="/livereload.js?port=1313&mindelay=10&v=2" data-no-instant defer></script>` apply := func(s string) string { out := new(bytes.Buffer) in := strings.NewReader(s) |