{"action":"opened","number":2829,"pull_request":{"url":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/2829","id":98322598,"html_url":"https://github.com/wenzhixin/bootstrap-table/pull/2829","diff_url":"https://github.com/wenzhixin/bootstrap-table/pull/2829.diff","patch_url":"https://github.com/wenzhixin/bootstrap-table/pull/2829.patch","issue_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/2829","number":2829,"state":"open","locked":false,"title":"Escape column title","user":{"login":"NTrukhanovets","id":11259493,"avatar_url":"https://avatars.githubusercontent.com/u/11259493?v=3","gravatar_id":"","url":"https://api.github.com/users/NTrukhanovets","html_url":"https://github.com/NTrukhanovets","followers_url":"https://api.github.com/users/NTrukhanovets/followers","following_url":"https://api.github.com/users/NTrukhanovets/following{/other_user}","gists_url":"https://api.github.com/users/NTrukhanovets/gists{/gist_id}","starred_url":"https://api.github.com/users/NTrukhanovets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NTrukhanovets/subscriptions","organizations_url":"https://api.github.com/users/NTrukhanovets/orgs","repos_url":"https://api.github.com/users/NTrukhanovets/repos","events_url":"https://api.github.com/users/NTrukhanovets/events{/privacy}","received_events_url":"https://api.github.com/users/NTrukhanovets/received_events","type":"User","site_admin":false},"body":"In actual version of bootstrap-table (1.11.0) found that if we try to call method `bootstrapTable()` with option `columns`, where at least one column has title, for example, `<script>alert(\"1”)</script>`, it falls with error and application become blocked.\r\n\r\n> Uncaught (in promise) SyntaxError: Invalid or unexpected token\r\n>     at eval (<anonymous>)\r\n>     at Function.globalEval (jquery.js?27d9:328)\r\n>     at jQuery.fn.init.domManip (jquery.js?27d9:5430)\r\n>     at jQuery.fn.init.append (jquery.js?27d9:5213)\r\n>     at jQuery.fn.init.<anonymous> (jquery.js?27d9:5328)\r\n>     at jQuery.access (jquery.js?27d9:3486)\r\n>     at jQuery.fn.init.html (jquery.js?27d9:5295)\r\n>     at BootstrapTable.initHeader (bootstrap-table.js?81d4:770)\r\n>     at BootstrapTable.init (bootstrap-table.js?81d4:516)\r\n>     at new BootstrapTable (bootstrap-table.js?81d4:245)\r\n>     at HTMLTableElement.<anonymous> (bootstrap-table.js?81d4:2787)\r\n>     at Function.each (jquery.js?27d9:374)\r\n>     at jQuery.fn.init.each (jquery.js?27d9:139)\r\n>     at jQuery.fn.init.$.fn.bootstrapTable (bootstrap-table.js?81d4:2764)\r\n\r\nTo fix this problem I add next piece of code:\r\n```js\r\ntext = that.options.escape ? escapeHTML(column.title) : column.title;\r\n```","created_at":"2016-12-16T11:53:28Z","updated_at":"2016-12-16T11:53:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/2829/commits","review_comments_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/2829/comments","review_comment_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/2829/comments","statuses_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/statuses/eefb59abaaab3124add21bb39429c26d8451fcaf","head":{"label":"NTrukhanovets:escape-column-title","ref":"escape-column-title","sha":"eefb59abaaab3124add21bb39429c26d8451fcaf","user":{"login":"NTrukhanovets","id":11259493,"avatar_url":"https://avatars.githubusercontent.com/u/11259493?v=3","gravatar_id":"","url":"https://api.github.com/users/NTrukhanovets","html_url":"https://github.com/NTrukhanovets","followers_url":"https://api.github.com/users/NTrukhanovets/followers","following_url":"https://api.github.com/users/NTrukhanovets/following{/other_user}","gists_url":"https://api.github.com/users/NTrukhanovets/gists{/gist_id}","starred_url":"https://api.github.com/users/NTrukhanovets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NTrukhanovets/subscriptions","organizations_url":"https://api.github.com/users/NTrukhanovets/orgs","repos_url":"https://api.github.com/users/NTrukhanovets/repos","events_url":"https://api.github.com/users/NTrukhanovets/events{/privacy}","received_events_url":"https://api.github.com/users/NTrukhanovets/received_events","type":"User","site_admin":false},"repo":{"id":76648229,"name":"bootstrap-table","full_name":"NTrukhanovets/bootstrap-table","owner":{"login":"NTrukhanovets","id":11259493,"avatar_url":"https://avatars.githubusercontent.com/u/11259493?v=3","gravatar_id":"","url":"https://api.github.com/users/NTrukhanovets","html_url":"https://github.com/NTrukhanovets","followers_url":"https://api.github.com/users/NTrukhanovets/followers","following_url":"https://api.github.com/users/NTrukhanovets/following{/other_user}","gists_url":"https://api.github.com/users/NTrukhanovets/gists{/gist_id}","starred_url":"https://api.github.com/users/NTrukhanovets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NTrukhanovets/subscriptions","organizations_url":"https://api.github.com/users/NTrukhanovets/orgs","repos_url":"https://api.github.com/users/NTrukhanovets/repos","events_url":"https://api.github.com/users/NTrukhanovets/events{/privacy}","received_events_url":"https://api.github.com/users/NTrukhanovets/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NTrukhanovets/bootstrap-table","description":"An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3) ","fork":true,"url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table","forks_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/forks","keys_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/teams","hooks_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/hooks","issue_events_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/issues/events{/number}","events_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/events","assignees_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/assignees{/user}","branches_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/branches{/branch}","tags_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/tags","blobs_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/git/refs{/sha}","trees_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/statuses/{sha}","languages_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/languages","stargazers_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/stargazers","contributors_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/contributors","subscribers_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/subscribers","subscription_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/subscription","commits_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/commits{/sha}","git_commits_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/git/commits{/sha}","comments_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/comments{/number}","issue_comment_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/issues/comments{/number}","contents_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/contents/{+path}","compare_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/merges","archive_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/downloads","issues_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/issues{/number}","pulls_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/pulls{/number}","milestones_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/milestones{/number}","notifications_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/labels{/name}","releases_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/releases{/id}","deployments_url":"https://api.github.com/repos/NTrukhanovets/bootstrap-table/deployments","created_at":"2016-12-16T11:22:34Z","updated_at":"2016-12-16T11:22:35Z","pushed_at":"2016-12-16T11:32:48Z","git_url":"git://github.com/NTrukhanovets/bootstrap-table.git","ssh_url":"git@github.com:NTrukhanovets/bootstrap-table.git","clone_url":"https://github.com/NTrukhanovets/bootstrap-table.git","svn_url":"https://github.com/NTrukhanovets/bootstrap-table","homepage":"http://bootstrap-table.wenzhixin.net.cn","size":6071,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"wenzhixin:develop","ref":"develop","sha":"60a8c3bcd50ab4821d805c5478024082e3147e0a","user":{"login":"wenzhixin","id":2117018,"avatar_url":"https://avatars.githubusercontent.com/u/2117018?v=3","gravatar_id":"","url":"https://api.github.com/users/wenzhixin","html_url":"https://github.com/wenzhixin","followers_url":"https://api.github.com/users/wenzhixin/followers","following_url":"https://api.github.com/users/wenzhixin/following{/other_user}","gists_url":"https://api.github.com/users/wenzhixin/gists{/gist_id}","starred_url":"https://api.github.com/users/wenzhixin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenzhixin/subscriptions","organizations_url":"https://api.github.com/users/wenzhixin/orgs","repos_url":"https://api.github.com/users/wenzhixin/repos","events_url":"https://api.github.com/users/wenzhixin/events{/privacy}","received_events_url":"https://api.github.com/users/wenzhixin/received_events","type":"User","site_admin":false},"repo":{"id":12246785,"name":"bootstrap-table","full_name":"wenzhixin/bootstrap-table","owner":{"login":"wenzhixin","id":2117018,"avatar_url":"https://avatars.githubusercontent.com/u/2117018?v=3","gravatar_id":"","url":"https://api.github.com/users/wenzhixin","html_url":"https://github.com/wenzhixin","followers_url":"https://api.github.com/users/wenzhixin/followers","following_url":"https://api.github.com/users/wenzhixin/following{/other_user}","gists_url":"https://api.github.com/users/wenzhixin/gists{/gist_id}","starred_url":"https://api.github.com/users/wenzhixin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenzhixin/subscriptions","organizations_url":"https://api.github.com/users/wenzhixin/orgs","repos_url":"https://api.github.com/users/wenzhixin/repos","events_url":"https://api.github.com/users/wenzhixin/events{/privacy}","received_events_url":"https://api.github.com/users/wenzhixin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wenzhixin/bootstrap-table","description":"An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3) ","fork":false,"url":"https://api.github.com/repos/wenzhixin/bootstrap-table","forks_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/forks","keys_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/teams","hooks_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/hooks","issue_events_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/events{/number}","events_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/events","assignees_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/assignees{/user}","branches_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/branches{/branch}","tags_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/tags","blobs_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/git/refs{/sha}","trees_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/statuses/{sha}","languages_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/languages","stargazers_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/stargazers","contributors_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/contributors","subscribers_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/subscribers","subscription_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/subscription","commits_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/commits{/sha}","git_commits_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/git/commits{/sha}","comments_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/comments{/number}","issue_comment_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/comments{/number}","contents_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/contents/{+path}","compare_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/merges","archive_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/downloads","issues_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues{/number}","pulls_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls{/number}","milestones_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/milestones{/number}","notifications_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/labels{/name}","releases_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/releases{/id}","deployments_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/deployments","created_at":"2013-08-20T15:34:15Z","updated_at":"2016-12-16T09:35:29Z","pushed_at":"2016-11-29T06:54:11Z","git_url":"git://github.com/wenzhixin/bootstrap-table.git","ssh_url":"git@github.com:wenzhixin/bootstrap-table.git","clone_url":"https://github.com/wenzhixin/bootstrap-table.git","svn_url":"https://github.com/wenzhixin/bootstrap-table","homepage":"http://bootstrap-table.wenzhixin.net.cn","size":6071,"stargazers_count":4912,"watchers_count":4912,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1816,"mirror_url":null,"open_issues_count":441,"forks":1816,"open_issues":441,"watchers":4912,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/2829"},"html":{"href":"https://github.com/wenzhixin/bootstrap-table/pull/2829"},"issue":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/2829"},"comments":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/2829/comments"},"review_comments":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/2829/comments"},"review_comment":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/pulls/2829/commits"},"statuses":{"href":"https://api.github.com/repos/wenzhixin/bootstrap-table/statuses/eefb59abaaab3124add21bb39429c26d8451fcaf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"NTrukhanovets"}}