commit | 03e03cfa69bb3277cda8cb0c66c96c3c0b5edd9c | [log] [tgz] |
---|---|---|
author | Carlo Alberto Ferraris <cafxx@mercari.com> | Sat Feb 29 07:28:16 2020 |
committer | Carlo Alberto Ferraris <cafxx@mercari.com> | Sat Feb 29 07:28:16 2020 |
tree | 1597851ea86598ccd466147bd182e3b505d482f2 | |
parent | 8edcc4e51f39ddbd3505a3386aff3f435a7fd028 [diff] |
Do not copy escape tables
diff --git a/jwriter/writer.go b/jwriter/writer.go index eb8547c..2c5b201 100644 --- a/jwriter/writer.go +++ b/jwriter/writer.go
@@ -297,11 +297,9 @@ p := 0 // last non-escape symbol - var escapeTable [128]bool + escapeTable := &htmlEscapeTable if w.NoEscapeHTML { - escapeTable = htmlNoEscapeTable - } else { - escapeTable = htmlEscapeTable + escapeTable = &htmlNoEscapeTable } for i := 0; i < len(s); {