Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nitter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TeDomum
Nitter
Commits
07492b7b
Commit
07492b7b
authored
4 years ago
by
Zed
Browse files
Options
Downloads
Patches
Plain Diff
Escape rss titles
Fixes #168
parent
1811a232
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/rss.nimf
+5
-3
5 additions, 3 deletions
src/views/rss.nimf
with
5 additions
and
3 deletions
src/views/rss.nimf
+
5
−
3
View file @
07492b7b
...
...
@@ -69,6 +69,7 @@
#var title = profile.fullname
#if not multi: title &= " / " & user
#end if
#title = xmltree.escape(title)
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
...
...
@@ -100,7 +101,7 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<atom:link href="${link}" rel="self" type="application/rss+xml" />
<title>${list.name} / @${list.username}</title>
<title>${
xmltree.escape(
list.name
)
} / @${list.username}</title>
<link>${link}</link>
<description>Twitter feed for: ${list.name} by @${list.username}. Generated by ${hostname}</description>
<language>en-us</language>
...
...
@@ -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 = ""
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<atom:link href="${link}" rel="self" type="application/rss+xml" />
<title>Search results for "${
n
ame}"</title>
<title>Search results for "${
escN
ame}"</title>
<link>${link}</link>
<description>Twitter feed for search "${
n
ame}". Generated by ${hostname}</description>
<description>Twitter feed for search "${
escN
ame}". Generated by ${hostname}</description>
<language>en-us</language>
<ttl>40</ttl>
${renderRssTweets(tweets, prefs, hostname)}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment