aboutsummaryrefslogtreecommitdiff
path: root/cmds/rss_test.go
diff options
context:
space:
mode:
authorSam Scholten2026-08-30 20:40:39 +1000
committerSam Scholten2026-08-30 20:40:39 +1000
commit49d9f3e0eaeeab234c3ec903be43b88919d98eff (patch)
treed44472e50119dd8ef9ab406a65b0f6b16a4daf7a /cmds/rss_test.go
parenteff960c54620bfba47d40bc3792ba805dea3dab3 (diff)
downloadfluxrec-49d9f3e0eaeeab234c3ec903be43b88919d98eff.tar.gz
fluxrec-49d9f3e0eaeeab234c3ec903be43b88919d98eff.zip
rss: render score head as HTML paragraph
Descriptions render as sanitized HTML in readers, where bare newlines collapse and the feed/score line ran into the article text. Wrap the headline in <p><em> so it breaks cleanly and reads as metadata, escaped on the wire by encoding/xml as description-carried HTML should be.
Diffstat (limited to 'cmds/rss_test.go')
-rw-r--r--cmds/rss_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/rss_test.go b/cmds/rss_test.go
index ca216ca..79d6d37 100644
--- a/cmds/rss_test.go
+++ b/cmds/rss_test.go
@@ -51,21 +51,21 @@ func TestRenderRSSGolden(t *testing.T) {
<link>https://example.com/c</link>
<guid isPermaLink="false">mf:103</guid>
<pubDate>Fri, 01 Mar 2024 11:00:00 +0000</pubDate>
- <description>Feed A · score 0.80</description>
+ <description>&lt;p&gt;&lt;em&gt;Feed A · score 0.80&lt;/em&gt;&lt;/p&gt;</description>
</item>
<item>
<title>Alpha &amp; Omega — Feed A</title>
<link>https://example.com/a?x=1&amp;y=2</link>
<guid isPermaLink="false">mf:101</guid>
<pubDate>Fri, 01 Mar 2024 05:00:00 +0000</pubDate>
- <description>Feed A · score 0.90 · batch median 0.55&#xA;&#xA;x &lt; y</description>
+ <description>&lt;p&gt;&lt;em&gt;Feed A · score 0.90 · batch median 0.55&lt;/em&gt;&lt;/p&gt;&#xA;x &lt; y</description>
</item>
<item>
<title>Beta — A Feed With An Extremely Long And Descri…</title>
<link>https://example.com/b</link>
<guid isPermaLink="false">mf:102</guid>
<pubDate>Fri, 01 Mar 2024 05:30:00 +0000</pubDate>
- <description>A Feed With An Extremely Long And Descriptive Title Here · score 0.20 · batch median 0.55&#xA;&#xA;second body</description>
+ <description>&lt;p&gt;&lt;em&gt;A Feed With An Extremely Long And Descriptive Title Here · score 0.20 · batch median 0.55&lt;/em&gt;&lt;/p&gt;&#xA;second body</description>
</item>
</channel>
</rss>`