<commit_before><?php


function xchan_content(&$a) {


	$o .= '<h3>Xchan Lookup</h3>';

	$o .= '<form action="xchan" method="get">';
	$o .= 'Lookup xchan beginning with: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';
	$o .= '<input type="submit" name="submit" value="Submit" /></form>'; 

	$o .= '<br /><br />';

	if(x($_GET,'addr')) {
		$addr = trim($_GET['addr']);
		$r = q("select xchan_name from xchan where xchan_hash like '%s%%'",
			dbesc(addr)
		);
		if($r) {
			foreach($r as $rr)
				$o .= $rr['xchan_name'] . EOL;
		}
		else
			notice( t('Not found.') . EOL);
	}	
	return $o;
}
<commit_msg>fix the xchan lookup tool<commit_after><?php


function xchan_content(&$a) {


	$o .= '<h3>Xchan Lookup</h3>';

	$o .= '<form action="xchan" method="get">';
	$o .= 'Lookup xchan beginning with: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';
	$o .= '<input type="submit" name="submit" value="Submit" /></form>'; 

	$o .= '<br /><br />';

	if(x($_GET,'addr')) {
		$addr = trim($_GET['addr']);

		$r = q("select xchan_name from xchan where xchan_hash like '%s%%'",
			dbesc($addr)
		);

		if($r) {
			foreach($r as $rr)
				$o .= $rr['xchan_name'] . EOL;
		}
		else
			notice( t('Not found.') . EOL);
	}	
	return $o;
}

{'fraction_non_alphanumeric': 0.2582883577486507, 'fraction_numerical': 0.007710100231303007, 'mean_word_length': 3.5865724381625443, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 19, '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': '6666320', 'n_tokens_mistral': 568, 'n_tokens_neox': 513, 'n_words': 120}