Closed AlfonsoUceda closed 1 year ago
Hi @AlfonsoUceda,
HTML printed in the application instead of rendering the slim file
how do you mean this?
Hey @apotonick
Imaging having HTML printed in the browser as text, that you can see the HTML tags (raw HTML) so the it is not interpreted as HTML.
That sounds like a problem with html_escape
... I currently don't have resources for fixing this (we're using ERB everywhere), maybe you want to investigate?
Will do @apotonick ;)
My guess is you need to do safe_html!
in safe_concat
. It's not beautiful but neither is Rails' view layer! :beers:
I've seen that this change in temple gem is the problem: https://github.com/judofyr/temple/pull/135, reverting that change makes it work, but not sure if there is a way to fix it or wait until rails 7.1 is released because of the changes in Rails described in that PR and the implications in cell gems.
Could it be a problem for ERB too? because cells-erb
uses erbse
that uses temple
gem.
@apotonick what do you think about this?
@AlfonsoUceda I see a comment that they believe it works with older Rails versions - aren't you saying that it doesn't work for you? Is Slim using Temple under the hood?
Going to close this issue because I've opened one in cells-slim https://github.com/trailblazer/cells-slim/issues/27
Hello everyone, with the recent release of slim gem v5 I receive the following error:
If I patch this class
lib/cell/view_model.rb:138
withalias_method :safe_concat, :<<
I don't see any error like this but usingrender
inside a slim cell file it renders using a string, so you see the HTML printed in the application instead of rendering the slim file