Handle (slightly) dodgy urls