kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 194 forks source link

Fail subsciption when using params with Fast Render. (Doesn't decode properly). #458

Open athiwatc opened 8 years ago

athiwatc commented 8 years ago

I know it's getting removed soon but here is the problem.

This is my subscription method.

subscriptions: function (params, queryParams) { this.register('readBook', Meteor.subscribe('book', params.book)); }

book is Harry/Potter When you route using FlowRouter.path method you get http://website/Harry%252FPotter. Which decoded properly on the client side to Harry/Potter but not on the server side which is Harry%252FPotter. (So the subscription will fail).

My current hacky fix is to just do subscriptions: function (params, queryParams) { this.register('readBook', Meteor.subscribe('book', params.book.replace('%252F', '/'))); }

Don't really know what is wrong with it.

arunoda commented 8 years ago

Okay. This could be an issue. Let's see. I'll have a look at this.