Do not copy escape tables

This commit is contained in:
Carlo Alberto Ferraris
2020-02-29 16:28:16 +09:00
parent 8edcc4e51f
commit 03e03cfa69
+2 -4
View File
@@ -297,11 +297,9 @@ func (w *Writer) String(s string) {
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); {