mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #2642 from connrs/feature-add-charset-to-rss
Ensure that the character set is UTF-8 for RSS feed
This commit is contained in:
commit
649bd589fe
2 changed files with 9 additions and 1 deletions
|
@ -344,7 +344,7 @@ frontendControllers = {
|
|||
});
|
||||
|
||||
when.all(feedItems).then(function () {
|
||||
res.set('Content-Type', 'text/xml');
|
||||
res.set('Content-Type', 'text/xml; charset=UTF-8');
|
||||
res.send(feed.xml());
|
||||
});
|
||||
});
|
||||
|
|
|
@ -57,3 +57,11 @@ CasperTest.begin('Ensures dated permalinks works with RSS', 2, function suite(te
|
|||
});
|
||||
CasperTest.Routines.togglePermalinks.run('off');
|
||||
}, false);
|
||||
|
||||
CasperTest.begin('Ensure that character set is UTF-8 for RSS feed', 1, function suite(test) {
|
||||
CasperTest.Routines.togglePermalinks.run('off');
|
||||
casper.thenOpen(url + 'rss/', function (response) {
|
||||
test.assertEqual(response.headers.get('Content-Type'), 'text/xml; charset=UTF-8', 'Content type should include UTF-8 character set encoding.');
|
||||
});
|
||||
}, false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue