Updated formatting
This commit is contained in:
parent
0b31c9f888
commit
4aea4ae42c
5 changed files with 5 additions and 5 deletions
|
@ -459,4 +459,4 @@ func nextPowerOf2(x uint32) uint32 {
|
||||||
x |= x >> 16
|
x |= x >> 16
|
||||||
x++
|
x++
|
||||||
return x
|
return x
|
||||||
}
|
}
|
|
@ -124,4 +124,4 @@ func TestSecurity(t *testing.T) {
|
||||||
assert.Equal(t, markdown.Render(`[text]('javAscRipt:alert("xss")')`), `<p><a href="'javAscRipt:alert("xss")'">text</a></p>`)
|
assert.Equal(t, markdown.Render(`[text]('javAscRipt:alert("xss")')`), `<p><a href="'javAscRipt:alert("xss")'">text</a></p>`)
|
||||||
assert.Equal(t, markdown.Render(`[text]("><script>alert(123)</script>)`), `<p><a href=""><script>alert(123)</script>">text</a></p>`)
|
assert.Equal(t, markdown.Render(`[text]("><script>alert(123)</script>)`), `<p><a href=""><script>alert(123)</script>">text</a></p>`)
|
||||||
assert.Equal(t, markdown.Render(`[<script>alert(123)</script>]()`), `<p><a href=""><script>alert(123)</script></a></p>`)
|
assert.Equal(t, markdown.Render(`[<script>alert(123)</script>]()`), `<p><a href=""><script>alert(123)</script></a></p>`)
|
||||||
}
|
}
|
|
@ -36,4 +36,4 @@ func BenchmarkLarge(b *testing.B) {
|
||||||
for b.Loop() {
|
for b.Loop() {
|
||||||
markdown.Render(input)
|
markdown.Render(input)
|
||||||
}
|
}
|
||||||
}
|
}
|
2
go.mod
2
go.mod
|
@ -2,4 +2,4 @@ module git.urbach.dev/go/markdown
|
||||||
|
|
||||||
go 1.24
|
go 1.24
|
||||||
|
|
||||||
require git.urbach.dev/go/assert v0.0.0-20250225153414-fc1f84f19edf
|
require git.urbach.dev/go/assert v0.0.0-20250225153414-fc1f84f19edf
|
2
go.sum
2
go.sum
|
@ -1,2 +1,2 @@
|
||||||
git.urbach.dev/go/assert v0.0.0-20250225153414-fc1f84f19edf h1:BQWa5GKNUsA5CSUa/+UlFWYCEVe3IDDKRbVqBLK0mAE=
|
git.urbach.dev/go/assert v0.0.0-20250225153414-fc1f84f19edf h1:BQWa5GKNUsA5CSUa/+UlFWYCEVe3IDDKRbVqBLK0mAE=
|
||||||
git.urbach.dev/go/assert v0.0.0-20250225153414-fc1f84f19edf/go.mod h1:y9jGII9JFiF1HNIju0u87OyPCt82xKCtqnAFyEreCDo=
|
git.urbach.dev/go/assert v0.0.0-20250225153414-fc1f84f19edf/go.mod h1:y9jGII9JFiF1HNIju0u87OyPCt82xKCtqnAFyEreCDo=
|
Loading…
Add table
Add a link
Reference in a new issue