Merge pull request #275 from CAFxX/cafxx-jwriter-opt

Do not copy escape tables
This commit is contained in:
GoWebProd
2020-03-30 22:44:40 +03:00
committed by GitHub
+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); {