<commit_before>from django.utils.html import format_html
from django.conf import settings

from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.whitelist import attribute_rule


def blacklist_tag():
    def fn(tag):
        return ""
    return fn


def unwrap_tag():
    def fn(tag):
        return tag.unwrap()
    return fn


@hooks.register('construct_whitelister_element_rules')
def whitelist_blockquote():
    return {
        'style': blacklist_tag(),
        'br': blacklist_tag(),
        'font': unwrap_tag(),
        'span': unwrap_tag(),
        'blockquote': attribute_rule({'class': True}),
        'p': attribute_rule({'class': True}),<commit_msg>Kill the extraneous tags with fire.<commit_after>from django.utils.html import format_html
from django.conf import settings

from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.whitelist import attribute_rule


def blacklist_tag():
    def fn(tag):
        return tag.decompose()
    return fn


def unwrap_tag():
    def fn(tag):
        return tag.unwrap()
    return fn


@hooks.register('construct_whitelister_element_rules')
def whitelist_blockquote():
    return {
        'style': blacklist_tag(),
        'br': blacklist_tag(),
        'font': unwrap_tag(),
        'span': unwrap_tag(),
        'blockquote': attribute_rule({'class': True}),
        'p': attribute_rule({'class': True}),
{'fraction_non_alphanumeric': 0.12037708484408992, 'fraction_numerical': 0.0, 'mean_word_length': 3.5098039215686274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1745578', 'n_tokens_mistral': 427, 'n_tokens_neox': 421, 'n_words': 103}