NewEpidode: Use parse rss.description instead of itunes.summary.

We can deal with(sort of) html now, so we should start indexing
the proper rss description. Also cleanup commented out code.
This commit is contained in:
Jordan Petridis
2018-04-03 19:42:10 +00:00
parent a946ddfab1
commit a463753c84
4 changed files with 15 additions and 75 deletions
-40
View File
@@ -327,44 +327,4 @@ mod tests {
let id = 000000000;
assert!(lookup_id(id).is_err());
}
#[test]
fn test_markup() {
let markup = html_to_pango_markup;
let m = markup("this is parsed");
assert_eq!(&m, "this is parsed");
let m = markup("this is <span>parsed</span>");
assert_eq!(&m, "this is &lt;span&gt;parsed&lt;/span&gt;");
let m = markup("this is &ssdf;");
assert_eq!(&m, "this is &amp;ssdf;");
let url = "http://url.com/test?param1&param2=test&param3#hashing";
let m = markup(&format!("this is &ssdf; {}", url));
assert_eq!(
&m,
&format!(
"this is &amp;ssdf; <a href=\"{0}\">{0}</a>",
url.replace('&', "&amp;")
)
);
for l in &[
("with links: http://gnome.org :D", "http://gnome.org"),
(
"with links: http://url.com/test.html&stuff :D",
"http://url.com/test.html&stuff",
),
] {
let m = markup(l.0);
assert_eq!(
&m,
&format!(
"with links: <a href=\"{0}\">{0}</a> :D",
l.1.replace('&', "&amp;")
)
);
}
}
}