File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 11module github.com/microcosm-cc/bluemonday
22
3- go 1.18
3+ go 1.19
44
55require (
66 github.com/aymerick/douceur v0.2.0
7- golang.org/x/net v0.0.0-20210614182718-04defd469f4e
7+ golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b
88)
99
1010require github.com/gorilla/css v1.0.0 // indirect
1111
1212retract [v1.0.0 , v1.0.18 ] // Retract older versions as only latest is to be depended upon
13+ retract v1.0.19 // Uses older version of golang.org/x/net
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP
22github.com/aymerick/douceur v0.2.0 /go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4 =
33github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY =
44github.com/gorilla/css v1.0.0 /go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c =
5- golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q =
6- golang.org/x/net v0.0.0-20210614182718-04defd469f4e /go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y =
5+ golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY =
6+ golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b /go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk =
Original file line number Diff line number Diff line change @@ -1602,9 +1602,17 @@ func TestComments(t *testing.T) {
16021602 in : `1 <!-- 2 --> 3` ,
16031603 expected : `1 <!-- 2 --> 3` ,
16041604 },
1605+ // Note that prior to go1.19 this test worked and preserved HTML comments
1606+ // of the style used by Microsoft to create browser specific sections.
1607+ //
1608+ // However as @zhsj notes https://github.com/microcosm-cc/bluemonday/pull/148
1609+ // the commit https://github.com/golang/net/commit/06994584 broke this.
1610+ //
1611+ // I haven't found a way to allow MS style comments without creating a risk
1612+ // for every user of bluemonday that utilises .AllowComments()
16051613 {
16061614 in : `<!--[if gte mso 9]>Hello<![endif]-->` ,
1607- expected : `<!--[if gte mso 9]> Hello< ![endif]-->` ,
1615+ expected : `<!--[if gte mso 9]> Hello< ![endif]-->` ,
16081616 },
16091617 }
16101618
You can’t perform that action at this time.
0 commit comments