-
-
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
Conversation
@@ -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> |
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?
<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 comment
The 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.
π Linked issue
#19 (comment)
β Type of change
π Description
As described in #19 (comment), after we've implemented the RSS feed for the blog entries, we found a few validation issues and some warnings.
This PR solves the main feed validation problems and addresses most of the warnings.
The only remaining warning is about having relative URLs within the posts contents. I don't think there's much we can do without hacky string manipulations to resolve this from the feed point of view.
π Checklist