-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSS feed fixes #28
base: main
Are you sure you want to change the base?
RSS feed fixes #28
Changes from all commits
17b80ab
d560ee4
92a81ac
b293be0
d071664
454a61d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> | ||
<channel> | ||
<title>AdonisJS Framework Blog</title> | ||
<link>https://adonisjs.com/</link> | ||
<link>https://adonisjs.com/blog</link> | ||
<description>All the latest AdonisJS Framework news.</description> | ||
<lastBuildDate>{{new Date()}}</lastBuildDate> | ||
<lastBuildDate>{{new Date().toUTCString()}}</lastBuildDate> | ||
<docs>https://validator.w3.org/feed/docs/rss2.html</docs> | ||
<language>en</language> | ||
<image> | ||
|
@@ -16,11 +16,11 @@ | |
@each(post in blogPosts) | ||
<item> | ||
<title><![CDATA[{{ post.title }}]]></title> | ||
<link>{{ route('blog.show', [post.slug]) }}</link> | ||
<guid>{{ post.slug }}</guid> | ||
<link>https://adonisjs.com{{ route('blog.show', [post.slug]) }}</link> | ||
<guid>https://adonisjs.com{{ route('blog.show', [post.slug]) }}</guid> | ||
<pubDate>{{ post.publishedAt }}</pubDate> | ||
<description><![CDATA[ {{{ post.contentHtml.summary }}} ]]></description> | ||
<content:encoded><![CDATA[ {{{ post.contentHtml.contents }}} ]]></content:encoded> | ||
<description><![CDATA[ {{{ sanitize(post.contentHtml.summary) }}} ]]></description> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sanitization is necessary so that we don't include dangerous elements in the output, such as script tags, etc. This solves almost all of the content related warnings in the validation tool. |
||
<content:encoded><![CDATA[ {{{ sanitize(post.contentHtml.contents) }}} ]]></content:encoded> | ||
</item> | ||
@end | ||
</channel> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the best way to get an absolute URL containing the right domain?