<commit_before>package br.com.caelum.brutal.sanitizer;

import org.owasp.html.HtmlPolicyBuilder;
import org.owasp.html.PolicyFactory;

public class HtmlSanitizer {
	private static PolicyFactory 
		policy = new HtmlPolicyBuilder()
		    .allowElements("a", "p", "pre", "code", "img", "kbd", "ol", "ul",
		    		"li", "strong", "h2", "blockquote", "hr")
		    .allowUrlProtocols("https", "http")
		    .allowAttributes("href").onElements("a")
		    .allowAttributes("class").onElements("pre")
		    .allowAttributes("src", "alt", "width", "height").onElements("img")
		    .requireRelNofollowOnLinks()
		    .toFactory();

	public static String sanitize(String html){
		return policy.sanitize(html);
	}
}<commit_msg>final e variavel em maiuscula<commit_after>package br.com.caelum.brutal.sanitizer;

import org.owasp.html.HtmlPolicyBuilder;
import org.owasp.html.PolicyFactory;

public class HtmlSanitizer {
	private static final PolicyFactory 
		POLICY = new HtmlPolicyBuilder()
		    .allowElements("a", "p", "pre", "code", "img", "kbd", "ol", "ul",
		    		"li", "strong", "h2", "blockquote", "hr")
		    .allowUrlProtocols("https", "http")
		    .allowAttributes("href").onElements("a")
		    .allowAttributes("class").onElements("pre")
		    .allowAttributes("src", "alt", "width", "height").onElements("img")
		    .requireRelNofollowOnLinks()
		    .toFactory();

	public static String sanitize(String html){
		return POLICY.sanitize(html);
	}
}
{'fraction_non_alphanumeric': 0.17103448275862068, 'fraction_numerical': 0.001379310344827586, 'mean_word_length': 4.454887218045113, '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': '3139263', 'n_tokens_mistral': 519, 'n_tokens_neox': 479, 'n_words': 95}