{"action":"created","issue":{"url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/issues/303","repository_url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs","labels_url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/issues/303/comments","events_url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/issues/303/events","html_url":"https://github.com/informatics-isi-edu/ermrestjs/issues/303","id":195683285,"number":303,"title":"Cannot interpolate columns with \".\" in name","user":{"login":"karlcz","id":1075148,"avatar_url":"https://avatars.githubusercontent.com/u/1075148?v=3","gravatar_id":"","url":"https://api.github.com/users/karlcz","html_url":"https://github.com/karlcz","followers_url":"https://api.github.com/users/karlcz/followers","following_url":"https://api.github.com/users/karlcz/following{/other_user}","gists_url":"https://api.github.com/users/karlcz/gists{/gist_id}","starred_url":"https://api.github.com/users/karlcz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlcz/subscriptions","organizations_url":"https://api.github.com/users/karlcz/orgs","repos_url":"https://api.github.com/users/karlcz/repos","events_url":"https://api.github.com/users/karlcz/events{/privacy}","received_events_url":"https://api.github.com/users/karlcz/received_events","type":"User","site_admin":false},"labels":[{"id":242020705,"url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-15T00:19:26Z","updated_at":"2016-12-15T01:20:02Z","closed_at":null,"body":"I need to be able to interpolate all columns even if they have names that mustache does not like, e.g. with a `.` character (or any other that mustache might disallow).\r\n\r\n- ideally, we should use a template system that does not make assumptions about names\r\n- alternatively, we might use a workaround like string-replacing or otherwise \"escaping\" unsafe characters while producing the markdown environment, so someone writing an annotation can use this mangled name to access the column data"},"comment":{"url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/issues/comments/267208767","html_url":"https://github.com/informatics-isi-edu/ermrestjs/issues/303#issuecomment-267208767","issue_url":"https://api.github.com/repos/informatics-isi-edu/ermrestjs/issues/303","id":267208767,"user":{"login":"hongsudt","id":414732,"avatar_url":"https://avatars.githubusercontent.com/u/414732?v=3","gravatar_id":"","url":"https://api.github.com/users/hongsudt","html_url":"https://github.com/hongsudt","followers_url":"https://api.github.com/users/hongsudt/followers","following_url":"https://api.github.com/users/hongsudt/following{/other_user}","gists_url":"https://api.github.com/users/hongsudt/gists{/gist_id}","starred_url":"https://api.github.com/users/hongsudt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hongsudt/subscriptions","organizations_url":"https://api.github.com/users/hongsudt/orgs","repos_url":"https://api.github.com/users/hongsudt/repos","events_url":"https://api.github.com/users/hongsudt/events{/privacy}","received_events_url":"https://api.github.com/users/hongsudt/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T01:20:01Z","updated_at":"2016-12-15T01:20:01Z","body":"#escape has been used in real deployments.. So we need to be careful about\nturning off features.\n\n\nOn Wed, Dec 14, 2016 at 5:16 PM, Chirag Sanghvi <notifications@github.com>\nwrote:\n\n> I think we might need to get rid of Mustache as escaping also won't work.\n> In addition other template languages also won't support it as . in\n> javascript is a property of an object.\n>\n> We can use handlebars, but for it you need to explicitly enclose the\n> column-name in quotes.\n>\n> // Change this object to change your valuesvar obj = {\n>    ID: \"Alice's Adventures in Wonderland \\t what is this\",\n>    \"this.is\": \"some name\"\n> };console.log(mustache.render('{{ID}} - {{\"this.is\"}}', obj));\n> var handlebars = require(\"handlebars\");console.log(handlebars.compile('{{ID}} - {{\"this.is\"}}')(obj));\n>\n> We can switch back to the old string replacement. Which I am sure supports\n> it, but it won't have the encode and other escaping stuff.\n>\n> https://runkit.com/chiragsanghvi/57b4b5f94c7bbd13004b43f6\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/informatics-isi-edu/ermrestjs/issues/303#issuecomment-267208163>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAZUDD6iqY4aFiXIDt4pGBcdreeKZMRGks5rIJT4gaJpZM4LNksV>\n> .[image: Web Bug from\n> https://github.com/notifications/beacon/AAZUDDgwM3LD7IKw78doB6LdRkJSYNcOks5rIJT4gaJpZM4LNksV.gif]\n> {\"api_version\":\"1.0\",\"publisher\":{\"api_key\":\"\n> 05dde50f1d1a384dd78767c55493e4bb\",\"name\":\"GitHub\"},\"entity\":\n> {\"external_key\":\"github/informatics-isi-edu/ermrestjs\"\n> ,\"title\":\"informatics-isi-edu/ermrestjs\",\"subtitle\":\"GitHub\n> repository\",\"main_image_url\":\"https://cloud.githubusercontent.com/assets/\n> 143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png\",\"\n> avatar_image_url\":\"https://cloud.githubusercontent.com/\n> assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png\n> \",\"action\":{\"name\":\"Open in GitHub\",\"url\":\"https://github.\n> com/informatics-isi-edu/ermrestjs\"}},\"updates\":{\"\n> snippets\":[{\"icon\":\"PERSON\",\"message\":\"@chiragsanghvi in #303: I think we\n> might need to get rid of Mustache as escaping also won't work. In addition\n> other template languages also won't support it as `.` in javascript is a\n> property of an object. \\r\\n\\r\\nWe can use handlebars, but for it you need\n> to explicitly enclose the column-name in quotes. \\r\\n\\r\\n```js\\r\\n// Change\n> this object to change your values\\r\\nvar obj = {\\r\\n ID: \\\"Alice's\n> Adventures in Wonderland \\\\t what is this\\\",\\r\\n \\\"this.is\\\": \\\"some\n> name\\\"\\r\\n};\\r\\nconsole.log(mustache.render('{{ID}} - {{\\\"this.is\\\"}}',\n> obj));\\r\\n\\r\\nvar handlebars = require(\\\"handlebars\\\");\\r\\\n> nconsole.log(handlebars.compile('{{ID}} - {{\\\"this.is\\\"}}')(obj));\\r\\n```\\r\\n\\r\\nWe\n> can switch back to the old string replacement. Which I am sure supports it,\n> but it won't have the encode and other escaping stuff.\\r\\n\\r\\n\\r\\nhttps://\n> runkit.com/chiragsanghvi/57b4b5f94c7bbd13004b43f6\"}],\"action\":{\"name\":\"View\n> Issue\",\"url\":\"https://github.com/informatics-isi-edu/ermrestjs/issues/303#\n> issuecomment-267208163\"}}}\n"}}
{"actor":{"display_login":"hongsudt"}}