{"action":"opened","issue":{"url":"https://api.github.com/repos/Thibaut/devdocs/issues/402","repository_url":"https://api.github.com/repos/Thibaut/devdocs","labels_url":"https://api.github.com/repos/Thibaut/devdocs/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/Thibaut/devdocs/issues/402/comments","events_url":"https://api.github.com/repos/Thibaut/devdocs/issues/402/events","html_url":"https://github.com/Thibaut/devdocs/issues/402","id":153669456,"number":402,"title":"Local file names from slugs are not being sanitized","user":{"login":"nucular","id":5305459,"avatar_url":"https://avatars.githubusercontent.com/u/5305459?v=3","gravatar_id":"","url":"https://api.github.com/users/nucular","html_url":"https://github.com/nucular","followers_url":"https://api.github.com/users/nucular/followers","following_url":"https://api.github.com/users/nucular/following{/other_user}","gists_url":"https://api.github.com/users/nucular/gists{/gist_id}","starred_url":"https://api.github.com/users/nucular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucular/subscriptions","organizations_url":"https://api.github.com/users/nucular/orgs","repos_url":"https://api.github.com/users/nucular/repos","events_url":"https://api.github.com/users/nucular/events{/privacy}","received_events_url":"https://api.github.com/users/nucular/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-08T18:12:57Z","updated_at":"2016-05-08T18:12:57Z","closed_at":null,"body":"*Repeatable:* When remote slugs contain characters unsafe for the local file system (in my case NTFS on Windows 7)\r\n\r\n*Steps to repeat:*\r\n1. Clone my [fork](https://github.com/nucular/devdocs/tree/love) for the LÖVE scraper (revision `42c08323796c8f60ac3fdd153e8107ecef13bba9` on branch `love`)\r\n2. Run `thor docs:page love Canvas:renderTo` (which might fail because the `docs:page` command is broken, just remove the check at [lib/tasks/docs.thor#L34:L36](https://github.com/Thibaut/devdocs/blob/master/lib/tasks/docs.thor#L34:L36) for now).\r\n\r\n*Expected result:* `public/docs/love/canvas:renderto.html` (or similar) is generated.\r\n\r\n*Actual result:* `public/docs/love/canvas` is generated.\r\n\r\n\r\nWhile writing a scraper for the [LÖVE](http://love2d.org) engine documentation I ran into an issue where remote pages with colons in their slugs (for example [Canvas:renderTo](https://love2d.org/wiki/Canvas:renderTo)) are being written to files named like the slug up to the first colon (for example `public/docs/love/canvas`). This results both in subsequent pages overwriting this file and in the client not being able to find this file under the expected path.\r\n\r\nI would fix this problem myself in a pull-request, but I am neither sure were path sanitization logic would be appropriately placed (I assume in `Docs.Doc#path`) nor what to replace unsafe characters with to keep the integrity of other documentations."}}