{"action":"created","issue":{"url":"https://api.github.com/repos/18F/federalist-docker-build/issues/6","repository_url":"https://api.github.com/repos/18F/federalist-docker-build","labels_url":"https://api.github.com/repos/18F/federalist-docker-build/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/18F/federalist-docker-build/issues/6/comments","events_url":"https://api.github.com/repos/18F/federalist-docker-build/issues/6/events","html_url":"https://github.com/18F/federalist-docker-build/pull/6","id":145848584,"number":6,"title":"Whitelist ASCII characters for status update POST","user":{"login":"jeremiak","id":780941,"avatar_url":"https://avatars.githubusercontent.com/u/780941?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremiak","html_url":"https://github.com/jeremiak","followers_url":"https://api.github.com/users/jeremiak/followers","following_url":"https://api.github.com/users/jeremiak/following{/other_user}","gists_url":"https://api.github.com/users/jeremiak/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremiak/subscriptions","organizations_url":"https://api.github.com/users/jeremiak/orgs","repos_url":"https://api.github.com/users/jeremiak/repos","events_url":"https://api.github.com/users/jeremiak/events{/privacy}","received_events_url":"https://api.github.com/users/jeremiak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-05T01:02:09Z","updated_at":"2016-04-06T00:59:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/18F/federalist-docker-build/pulls/6","html_url":"https://github.com/18F/federalist-docker-build/pull/6","diff_url":"https://github.com/18F/federalist-docker-build/pull/6.diff","patch_url":"https://github.com/18F/federalist-docker-build/pull/6.patch"},"body":"@yozlet had some issues adding a site to Federalist, and in the process of debugging it we discovered that characters used for color formatting output were not being handled properly by the [node app](/18f/federalist).\r\n\r\nHere is an [example of such a request](https://www.runscope.com/public/7f8781d2-660e-412d-8493-a8b13760f650/fa7bab58-2300-48fc-8901-6a230f55793e). The server was returning a 400 instead of a 200.\r\n\r\nThis change is so that the POSTed output is piped through `tr` first. Here is an [example of a request](https://www.runscope.com/public/7f8781d2-660e-412d-8493-a8b13760f650/5df4eeb5-798e-405d-88b5-b5ef6dc53683) made utilizing `tr`.\r\n\r\nHere is the command I tested with for ease of replication:\r\n\r\n```\r\necho \"Starting a test build\"\r\ndocker run -e CALLBACK='<<your federalist server address>>/build/status/8385/prodBuildtoken' \\\r\n-e BASEURL='/' \\\r\n-e BRANCH=18f-pages \\\r\n-e REPOSITORY=wds-federalist \\\r\n-e OWNER=yozlet \\\r\n-e GENERATOR=jekyll \\\r\n-e  GITHUB_TOKEN=<<any github token that has read access to the repo should work>> \\\r\nfederalist-docker-build\r\n```\r\n\r\nI also updated the documentation to include steps for local development."},"comment":{"url":"https://api.github.com/repos/18F/federalist-docker-build/issues/comments/206058230","html_url":"https://github.com/18F/federalist-docker-build/pull/6#issuecomment-206058230","issue_url":"https://api.github.com/repos/18F/federalist-docker-build/issues/6","id":206058230,"user":{"login":"yozlet","id":173848,"avatar_url":"https://avatars.githubusercontent.com/u/173848?v=3","gravatar_id":"","url":"https://api.github.com/users/yozlet","html_url":"https://github.com/yozlet","followers_url":"https://api.github.com/users/yozlet/followers","following_url":"https://api.github.com/users/yozlet/following{/other_user}","gists_url":"https://api.github.com/users/yozlet/gists{/gist_id}","starred_url":"https://api.github.com/users/yozlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yozlet/subscriptions","organizations_url":"https://api.github.com/users/yozlet/orgs","repos_url":"https://api.github.com/users/yozlet/repos","events_url":"https://api.github.com/users/yozlet/events{/privacy}","received_events_url":"https://api.github.com/users/yozlet/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T00:59:45Z","updated_at":"2016-04-06T00:59:45Z","body":"Replacing the ANSI colour codes with HTML would be lovely and probably solve most of the problems here, assuming that Federalist can happily (and safely) display the error logs in HTML on the other side."}}