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
Fix to render stylesheets as html safe string on Rails 6 #483
Conversation
They are currently unmaintained.
PDFKit concats HTML. So, it should not be escaped.
@@ -1,11 +1,15 @@ | |||
language: ruby | |||
|
|||
rvm: | |||
- 2.3 | |||
- 2.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped these Ruby versions because they don't work with Rails 6.x.
If you want to keep them, I'll update this PR.
@serene How do you feel about this change? |
lgtm. Thanks for the clean fix and test. I think we will drop support for ruby 2.3, 2.4. Can you add that as a note to the readme so that it's clear for users? |
Thanks for your confirmation 😄 It seems there are no description about supported Ruby versions in readme for now. As an alternative, adding What do you prefer? |
@tricknotes It's nice to have both usually, just to avoid more questions than necessary :) |
Now, pdfkit supports Ruby 2.5 or later.
In Rails 6, the spec of
ActiveSupport::SafeBuffer
methods has been changed.Previously, it behaves like just String, but now
ActiveSupport::SafeBuffer
exactly.See for details: rails/rails#33990
This change breaks stylesheets rendering.
The rendered PDF has too escaped style tag.
There is a result of failing spec that I added in 760a8ed.