Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ parking_lot = "=0.12.3"
paste = "=1.0.15"
postgres-native-tls = "=0.5.0"
prometheus = { version = "=0.13.4", default-features = false }
quick-xml = "=0.37.0"
rand = "=0.8.5"
reqwest = { version = "=0.12.9", features = ["gzip", "json"] }
rss = { version = "=2.0.10", default-features = false, features = ["atom"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ snapshot_kind: text
<item>
<title>New crate created: baz</title>
<link>https://crates.io/crates/baz</link>
<description><![CDATA[does it handle XML? &lt;item&gt;]]></description>
<description><![CDATA[does it handle XML? <item>]]></description>
<guid>https://crates.io/crates/baz</guid>
<pubDate>Fri, 21 Jun 2024 17:01:33 +0000</pubDate>
<crates:name>baz</crates:name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: src/tests/worker/rss/sync_updates_feed.rs
expression: content
snapshot_kind: text
---
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:crates="https://crates.io/">
Expand Down Expand Up @@ -29,7 +30,7 @@ expression: content
<item>
<title>New crate version published: bar v3.0.0-beta.1</title>
<link>https://crates.io/crates/bar/3.0.0-beta.1</link>
<description><![CDATA[let&apos;s try &amp; break this &lt;item&gt;]]></description>
<description><![CDATA[let's try & break this <item>]]></description>
<guid>https://crates.io/crates/bar/3.0.0-beta.1</guid>
<pubDate>Fri, 21 Jun 2024 17:03:45 +0000</pubDate>
<crates:name>bar</crates:name>
Expand Down
6 changes: 1 addition & 5 deletions src/worker/jobs/rss/sync_crates_feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ impl NewCrate {
permalink: true,
};

let description = self
.description
.map(|d| quick_xml::escape::escape(&d).to_string());

let name_extension = rss::extension::Extension {
name: "crates:name".into(),
value: Some(self.name),
Expand All @@ -144,7 +140,7 @@ impl NewCrate {
guid: Some(guid),
title: Some(title),
link: Some(link),
description,
description: self.description,
pub_date: Some(pub_date),
extensions,
..Default::default()
Expand Down
6 changes: 1 addition & 5 deletions src/worker/jobs/rss/sync_updates_feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ impl VersionUpdate {
permalink: true,
};

let description = self
.description
.map(|d| quick_xml::escape::escape(&d).to_string());

let name_extension = rss::extension::Extension {
name: "crates:name".into(),
value: Some(self.name),
Expand All @@ -160,7 +156,7 @@ impl VersionUpdate {
guid: Some(guid),
title: Some(title),
link: Some(link),
description,
description: self.description,
pub_date: Some(pub_date),
extensions,
..Default::default()
Expand Down