Remove URL encoding in route.js in can js


#1

Hi,

I am using canjs 1.X version and as per my requirement, I have to remove URL encoding from my application. I checked the code and after removing the below code(encodeURIComponent) from route.js, it is working fine.
if ( route ) {
var cpy = extend({}, data),
// Create the url by replacing the var names with the provided data.
// If the default value is found an empty string is inserted.
res = route.route.replace(matcher, function( whole, name ) {
delete cpy[name];
return data[name] === route.defaults[name] ? “” : encodeURIComponent( data[name] );

But the issue is, I can not update the canjs version or files as I do not have access of library files in server so I have to overwrite or mange it from my application only.

Do you have any suggestion, how can I do that ?

I would appreciate , if you can kindly share some code so that it would be so helpful for me.


#2

For anyone watching (hello :wave:), this was discussed on GitHub: https://github.com/canjs/canjs/issues/4068