1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

fix: URL detection incorrectly capturing newlines in media descriptions

This commit is contained in:
Tim Douglas 2025-08-08 12:34:03 -04:00 committed by Frédéric Guillot
parent 98da7b3f22
commit a4f672b589
2 changed files with 5 additions and 3 deletions

View file

@ -83,6 +83,8 @@ func TestDescription(t *testing.T) {
{"", "", ""},
{"html", "a <b>c</b>", "a <b>c</b>"},
{"plain", "a\nhttp://www.example.org/", `a<br><a href="http://www.example.org/">http://www.example.org/</a>`},
{"plain", "Link: https://example.com/path\n\nAnother: https://example.org",
`Link: <a href="https://example.com/path">https://example.com/path</a><br><br>Another: <a href="https://example.org">https://example.org</a>`},
}
for _, scenario := range scenarios {