Improve slug generating function for line/set urls