Prevent googlebot from following relative paths in in-line JS

Googlebot tries to follow paths that appear anywhere on a page, including within inline scripts. That causes a lot of 404s to be logged by the bot which means we may miss genuine 404 problems due to excess noise.

This PR adds an escaping operation to the in-lined JS that is currently causing googlebot to record 404s.

It's behind a new switch so we can monitor the effects it has with minimal risk.