-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support Haml 6 #1820
Support Haml 6 #1820
Conversation
@k0kubun I appreciate your help 🙏 I'm seeing this warning when trying to upgrade to haml 6:
I'm also seeing our specs fail with this result:
It looks like Haml is escaping the output. Can we mark it safe somehow? |
rtomayko/tilt#387 seems to address it. We'd need to get it merged.
You could pass |
Of course! I see we do use |
Remove use of Haml::Buffer.
Use `!=` not to sanitize HTML. https://haml.info/docs/yardoc/file.REFERENCE.html#unescaping_html refs: haml/haml#1094 refs: sinatra/sinatra#1820 (comment)
So it seems that haml 6 is not supported out of the box. I needed to explicitly configure haml to not escape html like this:
in order to get yielded haml inside a layout to not be escaped. Adding it here if anyone else stumbles upon the same problem. |
or you can use |
explicitly prevent escaping of markup yielded into layout see https://github.com/haml/haml/blob/main/CHANGELOG.md#600 see sinatra/sinatra#1820 "The default value of escape_html option became true."
Use Haml::Buffer only if it is defined. Resolves #1816.