From 07492b7b39cc2af13db4d03f69ea34bb2bcdd698 Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 10 Jun 2020 17:17:17 +0200 Subject: [PATCH] Escape rss titles Fixes #168 --- src/views/rss.nimf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/rss.nimf b/src/views/rss.nimf index 727cd3d..1600820 100644 --- a/src/views/rss.nimf +++ b/src/views/rss.nimf @@ -69,6 +69,7 @@ #var title = profile.fullname #if not multi: title &= " / " & user #end if +#title = xmltree.escape(title) @@ -100,7 +101,7 @@ - ${list.name} / @${list.username} + ${xmltree.escape(list.name)} / @${list.username} ${link} Twitter feed for: ${list.name} by @${list.username}. Generated by ${hostname} en-us @@ -113,14 +114,15 @@ #proc renderSearchRss*(tweets: seq[Tweet]; name, param, hostname: string): string = #let prefs = Prefs(replaceTwitter: hostname, replaceYouTube: "invidio.us") #let link = &"https://{hostname}/search" +#let escName = xmltree.escape(name) #result = "" - Search results for "${name}" + Search results for "${escName}" ${link} - Twitter feed for search "${name}". Generated by ${hostname} + Twitter feed for search "${escName}". Generated by ${hostname} en-us 40 ${renderRssTweets(tweets, prefs, hostname)}