diff --git a/internal/reader/sanitizer/sanitizer_test.go b/internal/reader/sanitizer/sanitizer_test.go index 67c88585..76441042 100644 --- a/internal/reader/sanitizer/sanitizer_test.go +++ b/internal/reader/sanitizer/sanitizer_test.go @@ -709,7 +709,7 @@ func TestImageSrcWithTrackers(t *testing.T) { } } -func TestPixelTracker(t *testing.T) { +func Test1x1PixelTracker(t *testing.T) { input := `
and
and
` output := SanitizeHTMLWithDefaultOptions("http://example.org/", input) @@ -719,6 +719,16 @@ func TestPixelTracker(t *testing.T) { } } +func Test0x0PixelTracker(t *testing.T) { + input := ` and
and
` + output := SanitizeHTMLWithDefaultOptions("http://example.org/", input) + + if expected != output { + t.Errorf(`Wrong output: "%s" != "%s"`, expected, output) + } +} + func TestXmlEntities(t *testing.T) { input := `echo "test" > /etc/hosts` expected := `
echo "test" > /etc/hosts`