aboutsummaryrefslogtreecommitdiff
path: root/internal/reader/processor/processor_test.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2024-04-23 20:08:09 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2024-04-23 20:31:52 -0700
commitfb075b60b5d8f74d157d12cf66e32fe9580cf3fe (patch)
tree2539a39cd8e1b5c07a64e759cc52a28734c1255c /internal/reader/processor/processor_test.go
parent2c4c845cd2b40cfd468868efff7d4ba350124b47 (diff)
downloadv2-fb075b60b5d8f74d157d12cf66e32fe9580cf3fe.tar.gz
v2-fb075b60b5d8f74d157d12cf66e32fe9580cf3fe.tar.zst
v2-fb075b60b5d8f74d157d12cf66e32fe9580cf3fe.zip
reader/processor: minifier is breaking HTML entry content
Diffstat (limited to 'internal/reader/processor/processor_test.go')
-rw-r--r--internal/reader/processor/processor_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/reader/processor/processor_test.go b/internal/reader/processor/processor_test.go
index e99a566a..48ae2d6b 100644
--- a/internal/reader/processor/processor_test.go
+++ b/internal/reader/processor/processor_test.go
@@ -117,3 +117,12 @@ func TestIsRecentEntry(t *testing.T) {
}
}
}
+
+func TestMinifyEntryContent(t *testing.T) {
+ input := `<p> Some text with a <a href="http://example.org/"> link </a> </p>`
+ expected := `<p>Some text with a <a href="http://example.org/">link</a></p>`
+ result := minifyEntryContent(input)
+ if expected != result {
+ t.Errorf(`Unexpected result, got %q`, result)
+ }
+}