il problema e che nel risultati di ricerca io ci ho messo un immagine e un testo

ora quando clicco uno dei risultati, mi mette nell'input text "<img src ecc ecc" invece io vorrei che al click andasse da un altra parte


credo che la parte incriminata sia questa jquery autocomlete

codice:
function _table_format(options, row, pos){
			if(!options.separator) options.separator = "#";
			var _arr = row[1].split(options.separator);
			var _str = "";
			for(var _x = 0;_x < _arr.length;_x++){
				_str += '<div  class="fld_'+(_x + 1)+'">'+_arr[_x]+'</div>';
			}
			_str = "<div class=\"tbl\">" + _str + "</div>";
			if(pos == 1){
				jQuery(".ac_results > ul").css("position","relative");
				var _int = '';
				for(var _x = 0;_x < options.th.length;_x++){
					_int += '<div id="int_'+(_x + 1)+'">'+options.th[_x]+'</div>';
				} 
				jQuery('<li class="ac_intestazione"><div class="tbl">'+_int+'</div>')
				.appendTo(".ac_results > ul");
			}else if(pos == 2){
				jQuery(".ac_results > ul > li").not(".ac_intestazione").css("margin-top","20px");
			}
			return _str;
		}

mentre il css e questo

codice:
 .ac_results {
	padding: 0px;
	border: 1px solid black;
	background-color: white;
	overflow: hidden;
	z-index: 99999;
}

.ac_results ul {
	width: 100%;
	list-style-position: outside;
	list-style: none;
	padding: 0;
	margin: 0;
}
.ac_results ul a {
	display: block;

}

.ac_results ul a span{
display:none; 
}

.ac_results li {
	margin: 0px;
	padding: 2px 5px;
	cursor: default;
	display: block;
	/* 
	if width will be 100% horizontal scrollbar will apear 
	when scroll mode will be used
	*/
	/*width: 100%;*/
	font: menu;
	font-size: 12px;
	/* 
	it is very important, if line-height not setted or setted 
	in relative units scroll will be broken in firefox
	*/
	line-height: 16px;
	overflow: hidden;
	width:100%; height:100%;
}


.ac_loading {
	background: white url('indicator.gif') right center no-repeat;
}

.ac_odd {
	background-color: #eee;
}

.ac_over {
	background-color: #0A246A;
	color: white;
}