<commit_before>*   Dom and Selector assertions has extracted to rails-dom-testing to better be used in both Action Pack and Action View.

    Note:
    This also changes the substitution values syntax in `assert_select`.

    `assert_select "div#?", /\d+/`
    `assert_select "div:match('id', ?)", /\d+/`

    The attribute to match should be enclosed in quotes to avoid
    issues with Nokogiri's css selector syntax parsing.
    It is not necessary to do so with the question mark.
    Calling `assert_select` with an invalid selector will emit a deprecation warning and skip the assertions.

    *<NAME>*

*   Loofah replaces html-scanner in `sanitize_helper`

    `sanitize` can now take a `Loofah::Scrubber` for powerful scrubbing.
    [See some examples of scrubbers here](https://github.com/flavorjones/loofah#loofahscrubber)

    `PermitScrubber` has been added. Set the attributes and tags you want to keep and get everything else stripped.

    `TargetScrubber` has been added. Set the attributes and tags you want to have stripped and keep everything else.

    The documentation for `PermitScrubber` and `TargetScrubber` explains how you can gain complete control over when and how elements should be stripped.

    *<NAME>*

*   Bring `cache_digest` rake tasks up-to-date with the latest API changes

    *<NAME>*

*   Allow custom `:host` option to be passed to `asset_url` helper that
    overwrites `config.action_controller.asset_host` for particular asset.

    *<NAME>*

*   Deprecate `AbstractController::Base.parent_prefixes`.
    Override `AbstractController::Base.local_prefixes` when you want to change
    where to find views.

    *<NAME>*

*   Take label values into account when doing I18n lookups for model attributes.

    The following:

        # form.html.erb
        <%= form_for @post do |f| %>
          <%= f.label :type, value: "long" %>
        <% end %>

        # en.yml
        en:
          activerecord:
            attributes:
              post/long: "Long-form Post"

    Used to simply return "long", but now it will return "Long-form
    Post".

    *<NAME>*

*   Change `asset_path` to use File.join to create proper paths:

    Before:

        https://some.host.com//assets/some.js

    After:

        https://some.host.com/assets/some.js

    *<NAME>*

*   Change `favicon_link_tag` default mimetype from `image/vnd.microsoft.icon` to
    `image/x-icon`.

    Before:

        #=> favicon_link_tag 'myicon.ico'
        <link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />

    After:

        #=> favicon_link_tag 'myicon.ico'
        <link href="/assets/myicon.ico" rel="shortcut icon" type="image/x-icon" />

    *<NAME>*

*   Remove wrapping div with inline styles for hidden form fields.

    We are dropping HTML 4.01 and XHTML strict compliance since input tags directly
    inside a form are valid HTML5, and the absense of inline styles help in validating
    for Content Security Policy.

    *<NAME>*

*   `collection_check_boxes` respects `:index` option for the hidden filed name.

    Fixes #14147.

    *<NAME>*

*   `date_select` helper with option `with_css_classes: true` does not overwrite other classes.

    *<NAME>*

*   `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
    as input.

    Fixes #14405.

    *<NAME>*

*   Add `include_hidden` option to `collection_check_boxes` helper.

    *<NAME>*

*   Fixed a problem where the default options for the `button_tag` helper is not
    applied correctly.

    Fixes #14254.

    *<NAME>ko*

*   Take variants into account when calculating template digests in ActionView::Digestor.

    The arguments to ActionView::Digestor#digest are now being passed as a hash
    to support variants and allow more flexibility in the future. The support for
    regular (required) arguments is deprecated and will be removed in Rails 5.0 or later.

    *<NAME>, <NAME>*

Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionview/CHANGELOG.md) for previous changes.
<commit_msg>Updated CHANGELOG message to include info about rails-html-sanitizer.<commit_after>*   Dom and Selector assertions has extracted to rails-dom-testing to better be used in both Action Pack and Action View.

    Note:
    This also changes the substitution values syntax in `assert_select`.

    `assert_select "div#?", /\d+/`
    `assert_select "div:match('id', ?)", /\d+/`

    The attribute to match should be enclosed in quotes to avoid
    issues with Nokogiri's css selector syntax parsing.
    It is not necessary to do so with the question mark.
    Calling `assert_select` with an invalid selector will emit a deprecation warning and skip the assertions.

    *<NAME>*

*   The sanitizers in `sanitize_helper` have been extracted to rails-html-sanitizer. Loofah is used for sanitization instead of html-scanner.
    
    This means:
    `sanitize` can now take a `Loofah::Scrubber` for powerful scrubbing.
    [See some examples of scrubbers here](https://github.com/flavorjones/loofah#loofahscrubber)

    `PermitScrubber` has been added. Set the attributes and tags you want to keep and get everything else stripped.

    `TargetScrubber` has been added. Set the attributes and tags you want to have stripped and keep everything else.

    The documentation for `PermitScrubber` and `TargetScrubber` explains how you can gain complete control over when and how elements should be stripped.

    *<NAME>*

*   Bring `cache_digest` rake tasks up-to-date with the latest API changes

    *<NAME>*

*   Allow custom `:host` option to be passed to `asset_url` helper that
    overwrites `config.action_controller.asset_host` for particular asset.

    *<NAME>*

*   Deprecate `AbstractController::Base.parent_prefixes`.
    Override `AbstractController::Base.local_prefixes` when you want to change
    where to find views.

    *<NAME>*

*   Take label values into account when doing I18n lookups for model attributes.

    The following:

        # form.html.erb
        <%= form_for @post do |f| %>
          <%= f.label :type, value: "long" %>
        <% end %>

        # en.yml
        en:
          activerecord:
            attributes:
              post/long: "Long-form Post"

    Used to simply return "long", but now it will return "Long-form
    Post".

    *<NAME>*

*   Change `asset_path` to use File.join to create proper paths:

    Before:

        https://some.host.com//assets/some.js

    After:

        https://some.host.com/assets/some.js

    *<NAME>*

*   Change `favicon_link_tag` default mimetype from `image/vnd.microsoft.icon` to
    `image/x-icon`.

    Before:

        #=> favicon_link_tag 'myicon.ico'
        <link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />

    After:

        #=> favicon_link_tag 'myicon.ico'
        <link href="/assets/myicon.ico" rel="shortcut icon" type="image/x-icon" />

    *<NAME>*

*   Remove wrapping div with inline styles for hidden form fields.

    We are dropping HTML 4.01 and XHTML strict compliance since input tags directly
    inside a form are valid HTML5, and the absense of inline styles help in validating
    for Content Security Policy.

    *<NAME>*

*   `collection_check_boxes` respects `:index` option for the hidden filed name.

    Fixes #14147.

    *<NAME>*

*   `date_select` helper with option `with_css_classes: true` does not overwrite other classes.

    *<NAME>*

*   `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
    as input.

    Fixes #14405.

    *<NAME>*

*   Add `include_hidden` option to `collection_check_boxes` helper.

    *<NAME>*

*   Fixed a problem where the default options for the `button_tag` helper is not
    applied correctly.

    Fixes #14254.

    *<NAME>*

*   Take variants into account when calculating template digests in ActionView::Digestor.

    The arguments to ActionView::Digestor#digest are now being passed as a hash
    to support variants and allow more flexibility in the future. The support for
    regular (required) arguments is deprecated and will be removed in Rails 5.0 or later.

    *<NAME>, <NAME>*

Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionview/CHANGELOG.md) for previous changes.

{'fraction_non_alphanumeric': 0.09285542458503729, 'fraction_numerical': 0.006495068559057012, 'mean_word_length': 3.0819833087874327, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 49, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7424801', 'n_tokens_mistral': 2611, 'n_tokens_neox': 2426, 'n_words': 911}