NEW: Sanitise task name in runTask
BUG Reapply fix for cms crashing due to History.js blindly appending slashes to end of url