Skip to content
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

Google URL Encoding #82

Open
brandicted opened this issue Dec 28, 2013 · 1 comment
Open

Google URL Encoding #82

brandicted opened this issue Dec 28, 2013 · 1 comment

Comments

@brandicted
Copy link

Hi,

I just came across an issue when working on making our search pages indexable by Google. We use backbone-query-parameters to render search-result pages.

The issue is that Googlebot always encodes the following characters found in URLs: " (space)", "<", ">", "[", "", "]", "^", "`", "{", "|", "}". (read more here: http://www.monperrus.net/martin/google+url+encoding)

Since backbone-query-parameters uses "|" as separators, Google encodes those characters when crawling the URLs (i.e. %7C) and as a result backbone does not render the page as it should be.

I propose adding the following line 214 of backbone.queryparams.js:
var value = Backbone.Router.decodeURISeparator?decodeURIComponent(value):value;

and add the Backbone.Router.decodeURISeparator mention to readme.md.

Let me know your thoughts.

thanks,

Jonathan

@jhudson8
Copy link
Owner

I'll be looking at possibly removing the separator in future releases in favor of a more standard format (which is already supported); #myroute?foo=a|b is the same as #myroute?foo=a&foo=b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant