Skip to content

Disable html_safe check for JSON.pretty_generate #409

Description

@hlascelles

We are seeing "erb interpolation with '<%= (...).html_safe %>' in this context is never safe" errors for this:

<%= JSON.pretty_generate(foo: :bar).html_safe %>

Due to this: https://github.com/Shopify/better-html/blob/121065400314db191cae7202073cdc8b9125b4bb/lib/better_html/test_helper/safe_erb/tag_interpolation.rb#L175

Should we make JSON.pretty_generate be "safeable" by default?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions