<commit_before>from django import template
from django.conf import settings
from django.utils.safestring import mark_safe

register = template.Library()


@register.simple_tag()
def swampdragon_settings():
    root_url = getattr(settings, 'DRAGON_URL') or 'http://localhost:9999/'
    if not root_url.endswith('/'):
        root_url += '/'
    return mark_safe('<script type="text/javascript" src="{}settings.js"></script>'.format(root_url))<commit_msg>used format_html according to django documentation.<commit_after>from django import template
from django.conf import settings
from django.utils.safestring import mark_safe
from django.utils.html import format_html

register = template.Library()


@register.simple_tag()
def swampdragon_settings():
    root_url = getattr(settings, 'DRAGON_URL') or 'http://localhost:9999/'
    if not root_url.endswith('/'):
        root_url += '/'
    return format_html('<script type="text/javascript" src="{}settings.js"></script>',
                       mark_safe(root_url))
{'fraction_non_alphanumeric': 0.129064039408867, 'fraction_numerical': 0.007881773399014778, 'mean_word_length': 4.707865168539326, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3511108', 'n_tokens_mistral': 303, 'n_tokens_neox': 290, 'n_words': 69}