{"action":"created","issue":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/4457","repository_url":"https://api.github.com/repos/jekyll/jekyll","labels_url":"https://api.github.com/repos/jekyll/jekyll/issues/4457/labels{/name}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/4457/comments","events_url":"https://api.github.com/repos/jekyll/jekyll/issues/4457/events","html_url":"https://github.com/jekyll/jekyll/issues/4457","id":130882059,"number":4457,"title":"Files that start with a tilde (~) break builds","user":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},"labels":[{"url":"https://api.github.com/repos/jekyll/jekyll/labels/bug","name":"bug","color":"d41313"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jekyll/jekyll/milestones/37","html_url":"https://github.com/jekyll/jekyll/milestones/3.0.3","labels_url":"https://api.github.com/repos/jekyll/jekyll/milestones/37/labels","id":1559286,"number":37,"title":"3.0.3","description":null,"creator":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2016-02-02T18:16:27Z","updated_at":"2016-02-03T01:37:49Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-02-03T01:37:40Z","updated_at":"2016-02-03T02:55:59Z","closed_at":null,"body":"The way [we use `File.expand_path`](https://github.com/jekyll/jekyll/blob/7df8f502487f3b6476b5ce0f296be28f70df59cb/lib/jekyll.rb#L156), we expand paths of every file. We should escape a number of different values in this call. [StackOverflow has a great idea of what to escape](http://stackoverflow.com/questions/6159355/how-do-i-escape-parentheses-and-brackets-in-ruby).\r\n\r\n```irb\r\n>> File.expand_path(\"~hi.txt\")\r\nArgumentError: user hi.txt doesn't exist\r\n\tfrom (irb):3:in `expand_path'\r\n\tfrom (irb):3\r\n\tfrom /Users/parkr/.rbenv/versions/2.3.0/bin/irb:11:in `<main>'\r\n>> File.expand_path('\\~hi.txt')\r\n=> \"/Users/parkr/jekyll/jekyll/\\\\~hi.txt\"\r\n```\r\n\r\nShould be patched on 3.0.2 and 3.1.2.\r\n\r\n/cc @benbalter "},"comment":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/comments/178971510","html_url":"https://github.com/jekyll/jekyll/issues/4457#issuecomment-178971510","issue_url":"https://api.github.com/repos/jekyll/jekyll/issues/4457","id":178971510,"user":{"login":"envygeeks","id":99763,"avatar_url":"https://avatars.githubusercontent.com/u/99763?v=3","gravatar_id":"","url":"https://api.github.com/users/envygeeks","html_url":"https://github.com/envygeeks","followers_url":"https://api.github.com/users/envygeeks/followers","following_url":"https://api.github.com/users/envygeeks/following{/other_user}","gists_url":"https://api.github.com/users/envygeeks/gists{/gist_id}","starred_url":"https://api.github.com/users/envygeeks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envygeeks/subscriptions","organizations_url":"https://api.github.com/users/envygeeks/orgs","repos_url":"https://api.github.com/users/envygeeks/repos","events_url":"https://api.github.com/users/envygeeks/events{/privacy}","received_events_url":"https://api.github.com/users/envygeeks/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T02:55:59Z","updated_at":"2016-02-03T02:55:59Z","body":"Yeah, that's a terrible way to do `Shellwords.shellescape`"}}