fix clean_slug edge cases
Merge pull request #1614 from magopian/clean-slug-rework

fix clean_slug edge cases (bug 958124)