From 609b7121ea5113304d9671a4b09e42c6162dc674 Mon Sep 17 00:00:00 2001 From: Felix Sun Date: Mon, 16 Aug 2021 09:06:39 +0800 Subject: [PATCH] change escape ' to ' --- tag.go | 4 ++-- tag_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tag.go b/tag.go index c8c12a5..2f73c89 100644 --- a/tag.go +++ b/tag.go @@ -361,7 +361,7 @@ func JSONString(v interface{}) (r string) { } func escapeAttr(str string) (r string) { - r = strings.Replace(str, "'", "'", -1) - r = strings.Replace(r, "\n", "", -1) + r = strings.Replace(str, "'", "'", -1) + //r = strings.Replace(r, "\n", "", -1) return } diff --git a/tag_test.go b/tag_test.go index 1c30c60..88aeffb 100644 --- a/tag_test.go +++ b/tag_test.go @@ -49,7 +49,7 @@ var htmltagCases = []struct { ), expected: `
- +
`, },