Fix Legacy URL Parse

Fix legacy url parse

- Use `preg_replace` to only get `-/` to avoid dashes further down
Merge pull request #1161 from mkly/fix_legacy_url_parse

Fix Legacy URL Parse