Skip to content

caches_action with layout: false produces escaped html output on uncached response #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jonn opened this issue Jan 27, 2017 · 10 comments · Fixed by #48
Closed

caches_action with layout: false produces escaped html output on uncached response #43

jonn opened this issue Jan 27, 2017 · 10 comments · Fixed by #48

Comments

@jonn
Copy link

jonn commented Jan 27, 2017

As of actionpack-action_caching 1.2.0, I’m getting escaped HTML for the output of a caches_action action when there is no cache to serve. When the action is already cached, the HTML output is not escaped and pages look/function as expected.

class HomeController < ApplicationController

  caches_action :index, layout: false

  …

end

Reverting to actionpack-action_caching 1.1.1 restores the expected behavior (html not escaped whether action output is cached or not).

@jonn jonn closed this as completed Jan 27, 2017
@jonn jonn reopened this Jan 27, 2017
@nazarok
Copy link

nazarok commented Jan 28, 2017

this PR #42 fix it

@jonn
Copy link
Author

jonn commented Jan 30, 2017

Yes, I have confirmed that the change in PR #42 fixes this problem with actionpack-action_caching 1.2.0 for me. Thanks @nazarok!

antulik added a commit to antulik/actionpack-action_caching that referenced this issue May 27, 2017
antulik added a commit to antulik/actionpack-action_caching that referenced this issue May 27, 2017
@jogaco
Copy link

jogaco commented Jun 20, 2017

Bitten by this. Any chance for this being merged?

@adambutler
Copy link

adambutler commented Jul 19, 2017

I've too had this issue... but secondly, I am getting my layout inside my layout...

screen shot 2017-07-19 at 11 40 21

My guess was that the originally the page + layout was cached so ran rake tmp:cache:clear but this has not resolved the issue.

I believe this was also raised (but misunderstood) by @vishaljagtap-tudip in his comment in #47.

@jonn @jogaco @nazarok @antulik Have you experienced this issue?

@jogaco
Copy link

jogaco commented Jul 19, 2017

Don't remember if I had layout inside layout. I do remember escaped html output. I am now using @antulik fork which solves the problem

@adambutler
Copy link

@jogaco Thanks, tried using the fork, no luck.

@jogaco
Copy link

jogaco commented Jul 19, 2017

Just checked.
This works for me:
gem 'actionpack-action_caching', github: 'antulik/actionpack-action_caching', ref: '8c6e52c69315d67437f480da5dce4b7c8737fb32'

This produces an escaped html output.
gem 'actionpack-action_caching'

@panaak
Copy link

panaak commented Oct 10, 2017

also checked and @antulik fork fixes the problem for me.

@jskulski
Copy link

Ran into this and #42 works for us.

@snowblink
Copy link

@rafaelfranca any chance of getting this merged and a new release out please?

rafaelfranca added a commit that referenced this issue Jul 19, 2018
Fix #43 html escaping when layout is false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

7 participants