{"action":"created","issue":{"url":"https://api.github.com/repos/kartik-v/yii2-krajee-base/issues/38","labels_url":"https://api.github.com/repos/kartik-v/yii2-krajee-base/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/kartik-v/yii2-krajee-base/issues/38/comments","events_url":"https://api.github.com/repos/kartik-v/yii2-krajee-base/issues/38/events","html_url":"https://github.com/kartik-v/yii2-krajee-base/issues/38","id":85502818,"number":38,"title":"Json::htmlEncode","user":{"login":"nkovacs","id":2269242,"avatar_url":"https://avatars.githubusercontent.com/u/2269242?v=3","gravatar_id":"","url":"https://api.github.com/users/nkovacs","html_url":"https://github.com/nkovacs","followers_url":"https://api.github.com/users/nkovacs/followers","following_url":"https://api.github.com/users/nkovacs/following{/other_user}","gists_url":"https://api.github.com/users/nkovacs/gists{/gist_id}","starred_url":"https://api.github.com/users/nkovacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkovacs/subscriptions","organizations_url":"https://api.github.com/users/nkovacs/orgs","repos_url":"https://api.github.com/users/nkovacs/repos","events_url":"https://api.github.com/users/nkovacs/events{/privacy}","received_events_url":"https://api.github.com/users/nkovacs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-05T10:35:14Z","updated_at":"2015-06-05T11:16:58Z","closed_at":null,"body":"You should use `Json::htmlEncode` instead of `Json::encode` when the result is inserted into html.\r\n\r\nFor example, here: https://github.com/kartik-v/yii2-krajee-base/blob/master/WidgetTrait.php#L71\r\n\r\nMore info: http://www.yiiframework.com/news/86/yii-2-0-4-is-released/"},"comment":{"url":"https://api.github.com/repos/kartik-v/yii2-krajee-base/issues/comments/109260308","html_url":"https://github.com/kartik-v/yii2-krajee-base/issues/38#issuecomment-109260308","issue_url":"https://api.github.com/repos/kartik-v/yii2-krajee-base/issues/38","id":109260308,"user":{"login":"nkovacs","id":2269242,"avatar_url":"https://avatars.githubusercontent.com/u/2269242?v=3","gravatar_id":"","url":"https://api.github.com/users/nkovacs","html_url":"https://github.com/nkovacs","followers_url":"https://api.github.com/users/nkovacs/followers","following_url":"https://api.github.com/users/nkovacs/following{/other_user}","gists_url":"https://api.github.com/users/nkovacs/gists{/gist_id}","starred_url":"https://api.github.com/users/nkovacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkovacs/subscriptions","organizations_url":"https://api.github.com/users/nkovacs/orgs","repos_url":"https://api.github.com/users/nkovacs/repos","events_url":"https://api.github.com/users/nkovacs/events{/privacy}","received_events_url":"https://api.github.com/users/nkovacs/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T11:16:58Z","updated_at":"2015-06-05T11:16:58Z","body":"Select2's tags may contain user input. I can't Html encode them, because select2 expects them to not be encoded, so they have to be Json::htmlEncode-ed to be correctly passed to select2."}}