make topic/path safe in route for `$`