{"action":"closed","issue":{"url":"https://api.github.com/repos/lotus/lotus/issues/398","labels_url":"https://api.github.com/repos/lotus/lotus/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/lotus/lotus/issues/398/comments","events_url":"https://api.github.com/repos/lotus/lotus/issues/398/events","html_url":"https://github.com/lotus/lotus/issues/398","id":118930211,"number":398,"title":"Exposures HTML-escaped too soon (?)","user":{"login":"katafrakt","id":119904,"avatar_url":"https://avatars.githubusercontent.com/u/119904?v=3","gravatar_id":"","url":"https://api.github.com/users/katafrakt","html_url":"https://github.com/katafrakt","followers_url":"https://api.github.com/users/katafrakt/followers","following_url":"https://api.github.com/users/katafrakt/following{/other_user}","gists_url":"https://api.github.com/users/katafrakt/gists{/gist_id}","starred_url":"https://api.github.com/users/katafrakt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katafrakt/subscriptions","organizations_url":"https://api.github.com/users/katafrakt/orgs","repos_url":"https://api.github.com/users/katafrakt/repos","events_url":"https://api.github.com/users/katafrakt/events{/privacy}","received_events_url":"https://api.github.com/users/katafrakt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-25T21:54:27Z","updated_at":"2015-11-26T09:01:28Z","closed_at":"2015-11-26T09:01:28Z","body":"I'm not sure if it's good repository to report, but here is my use case:\r\n\r\nIn the controller, I'm fetching some web pages as HTML. I want to run it through readability gem and finally display in the template. Unfortunately, even if I make readability call in the view, it's too late. The string is already escaped and I have no way to render it properly. \r\n\r\nAll I can do is:\r\n\r\n```ruby\r\n    expose :source_html\r\n\r\n    def call(params)\r\n      @source_html = ::Lotus::Utils::Escape::SafeString.new(open(params[:url]).read)\r\n    end\r\n````\r\n\r\nWhich is fine, but totally undocumented. Also, I'm not quite sure this is a formal public API to do that and if it won't change in the future.\r\n\r\nSo, one way would be to provide `_raw` helper which does the wrapping above, on controller level (it's not available right now). Another would be to describe this solution as recommended somewhere in the docs. One more would be to escape HTML between view and template, not between controller and view, although I understand it might be not desired for other security reasons."}}