guardian/frontend — pull request #5725 by JustinPinner (2014-08-26 13:21:14+00:00)
Title: Escape json football path-like references

As we did before with curl.js, we have to 'escape' references for football teams and tournaments that appear in a page's json configuration data and look like a relative path, e.g. {"esa-football-team":"/football/team/32"} or {"esa-football-tournament":"/football/tournament/div1"}.

Googlebot is currenty reading those values as urls and logging 404 errors when they don't resolve.

This PR adds a switch to enable the escaping of these references so that these values are broken out into component parts e.g. "/" + "football/" + "tournament/" + "div1" (values with trailing slashes don't appear to cause googlebot any problems).