Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Add compatibility for Rails 7.1 and HAML 6 #13

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

makmic
Copy link
Member

@makmic makmic commented Jun 17, 2024

This issue reported breaking compatibility with Rails 7.1 #12

Rails 7.1 turned out to

  • use #prepend to patch #unwrapped_html_escape. We solved that by prepending our own patch to ERB::Util and its singleton class
  • escape differently on 6 places across its codebase. We now need to patch ActionView::OutputBuffer and html_escape_once as well (the latter was an oversight for the current version of AngularXSS as well)

HAML 6 is now also different, but easier to patch. It ditched its own escaping in 6.0 on all places except Haml::Util.escape_html. Another module prepend on our side fixes that.

I suggest bumping the Version of this gem to 1.0 after these changes are merged into master.

@makmic makmic changed the title Add failing test case for Rails 7.1 Add compatibility for Rails 7.1 and HAML 6 Jun 20, 2024
@makmic makmic marked this pull request as ready for review June 20, 2024 10:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant