{"action":"created","issue":{"url":"https://api.github.com/repos/MusikAnimal/pageviews/issues/71","repository_url":"https://api.github.com/repos/MusikAnimal/pageviews","labels_url":"https://api.github.com/repos/MusikAnimal/pageviews/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/MusikAnimal/pageviews/issues/71/comments","events_url":"https://api.github.com/repos/MusikAnimal/pageviews/issues/71/events","html_url":"https://github.com/MusikAnimal/pageviews/issues/71","id":149159479,"number":71,"title":"Javascript error when using as search engine with terms with spaces","user":{"login":"Thue","id":519347,"avatar_url":"https://avatars.githubusercontent.com/u/519347?v=3","gravatar_id":"","url":"https://api.github.com/users/Thue","html_url":"https://github.com/Thue","followers_url":"https://api.github.com/users/Thue/followers","following_url":"https://api.github.com/users/Thue/following{/other_user}","gists_url":"https://api.github.com/users/Thue/gists{/gist_id}","starred_url":"https://api.github.com/users/Thue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thue/subscriptions","organizations_url":"https://api.github.com/users/Thue/orgs","repos_url":"https://api.github.com/users/Thue/repos","events_url":"https://api.github.com/users/Thue/events{/privacy}","received_events_url":"https://api.github.com/users/Thue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MusikAnimal/pageviews/labels/bug","name":"bug","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-18T14:01:35Z","updated_at":"2016-04-18T15:34:30Z","closed_at":"2016-04-18T15:34:30Z","body":"I am using Wikipedia article statistics as a Chromium search engine (background reading: http://www.tekrevue.com/tip/chrome-custom-search-engine/ ).\r\n\r\nSpecifically, I created the search engine with the following string: \r\n\r\nhttps://tools.wmflabs.org/pageviews/#project=en.wikipedia.org&platform=all-access&agent=user&pages=%s\r\n\r\nWhere Chromium will replace %s with the term I searched for, when used.\r\n\r\nHowever, this fails (no chart is shown) when searching for terms with spaces in them, for example \"HTML5 audio\", with the following javascript error in the console: application.js:9 \"Uncaught TypeError: Cannot read property 'label' of undefined.\" The chart then fails to appear. Bizarrely, hitting enter in the browser address line without any changes seems to cause the chart to display correctly.\r\n\r\nWhen using Wikipedia article statistics normally (ie not as a search engine), the search terms embedded in the URL actually have their spaces replaced by underscores. So this error is somewhat the result of irregular use. But it would still be nice if it worked."},"comment":{"url":"https://api.github.com/repos/MusikAnimal/pageviews/issues/comments/211434628","html_url":"https://github.com/MusikAnimal/pageviews/issues/71#issuecomment-211434628","issue_url":"https://api.github.com/repos/MusikAnimal/pageviews/issues/71","id":211434628,"user":{"login":"MusikAnimal","id":366374,"avatar_url":"https://avatars.githubusercontent.com/u/366374?v=3","gravatar_id":"","url":"https://api.github.com/users/MusikAnimal","html_url":"https://github.com/MusikAnimal","followers_url":"https://api.github.com/users/MusikAnimal/followers","following_url":"https://api.github.com/users/MusikAnimal/following{/other_user}","gists_url":"https://api.github.com/users/MusikAnimal/gists{/gist_id}","starred_url":"https://api.github.com/users/MusikAnimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MusikAnimal/subscriptions","organizations_url":"https://api.github.com/users/MusikAnimal/orgs","repos_url":"https://api.github.com/users/MusikAnimal/repos","events_url":"https://api.github.com/users/MusikAnimal/events{/privacy}","received_events_url":"https://api.github.com/users/MusikAnimal/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T15:34:30Z","updated_at":"2016-04-18T15:34:30Z","body":"Should be fixed now. Thanks for the report!"}}