<commit_before><?php

class BrwSanitize {

	static function html($str) {
		if (!is_string($str)) {
			return $str;
		}
		return htmlspecialchars($str, ENT_NOQUOTES, Configure::read('App.encoding'));
	}

	function url($string) {
		$http = strtolower(substr($string, 0, 7));
		$https = strtolower(substr($string, 0, 8));
		if ($http != 'http://' and  $https != 'https://') {
			return 'http://' . $string;
		} else {
			return $string;
		}
	}

}<commit_msg>replace only <> when sanitizing html because of issues with & converted into &amp; in form helper<commit_after><?php

class BrwSanitize {

	static function html($str) {
		if (!is_string($str)) {
			return $str;
		}
		return str_replace(array('<', '>'), array('&lt;', '&gt;'), $str);
	}

	function url($string) {
		$http = strtolower(substr($string, 0, 7));
		$https = strtolower(substr($string, 0, 8));
		if ($http != 'http://' and  $https != 'https://') {
			return 'http://' . $string;
		} else {
			return $string;
		}
	}

}
{'fraction_non_alphanumeric': 0.20570264765784113, 'fraction_numerical': 0.008146639511201629, 'mean_word_length': 3.7718446601941746, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5286012', 'n_tokens_mistral': 399, 'n_tokens_neox': 359, 'n_words': 87}