Skip to content

Commit

Permalink
Merge pull request #6251 from ErisDS/issues-6247
Browse files Browse the repository at this point in the history
Switch channel filters to use strings not literals
  • Loading branch information
sebgie committed Dec 21, 2015
2 parents c28f485 + 20f1028 commit c533c48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/server/controllers/frontend/channel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ getConfig = function getConfig(name) {
name: 'tag',
route: '/' + config.routeKeywords.tag + '/:slug/',
postOptions: {
filter: 'tags:%s'
filter: 'tags:\'%s\''
},
data: {
tag: {
Expand All @@ -28,7 +28,7 @@ getConfig = function getConfig(name) {
name: 'author',
route: '/' + config.routeKeywords.author + '/:slug/',
postOptions: {
filter: 'author:%s'
filter: 'author:\'%s\''
},
data: {
author: {
Expand Down
4 changes: 2 additions & 2 deletions core/test/unit/rss_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ describe('RSS', function () {
// test
res.send = function send(xmlData) {
apiBrowseStub.calledOnce.should.be.true;
apiBrowseStub.calledWith({page: 1, filter: 'tags:magic', include: 'author,tags,fields'}).should.be.true;
apiBrowseStub.calledWith({page: 1, filter: 'tags:\'magic\'', include: 'author,tags,fields'}).should.be.true;
apiTagStub.calledOnce.should.be.true;
xmlData.should.match(/<channel><title><!\[CDATA\[Magic - Test\]\]><\/title>/);
done();
Expand All @@ -322,7 +322,7 @@ describe('RSS', function () {
// test
res.send = function send(xmlData) {
apiBrowseStub.calledOnce.should.be.true;
apiBrowseStub.calledWith({page: 1, filter: 'author:joe', include: 'author,tags,fields'}).should.be.true;
apiBrowseStub.calledWith({page: 1, filter: 'author:\'joe\'', include: 'author,tags,fields'}).should.be.true;
apiUserStub.calledOnce.should.be.true;
xmlData.should.match(/<channel><title><!\[CDATA\[Joe Blogs - Test\]\]><\/title>/);
done();
Expand Down

0 comments on commit c533c48

Please sign in to comment.