Make sure :'s are converted to -'s, allowing CORS.

Couldn't get the test suite running, so please test.

We're calling modal templates from another domain, hence the problem.