escape all '#' in routing patterns
closes #789