Skip to content

Commit

Permalink
change escape ' to '
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfmin committed Aug 16, 2021
1 parent af3d4eb commit 609b712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var htmltagCases = []struct {
),
expected: `
<div>
<div class='menu' id='the><&"&apos;-menu'>Hello</div>
<div class='menu' id='the><&"&#39;-menu'>Hello</div>
</div>
`,
},
Expand Down

0 comments on commit 609b712

Please sign in to comment.