1// +-------------------------------------------------+ 2// © 2002-2004 PMB Services / www.sigb.net [email protected] et contributeurs (voir www.sigb.net) 3// +-------------------------------------------------+ 4// $Id: handle_drop.js,v 1.4 2013/06/19 07:05:30 ngantier Exp $ 5 6function title_textfield(dragged,target) { 7 target.value=dragged.firstChild.data; 8} 9 10function image_textfield(dragged,target) { 11 target.value=dragged.firstChild.src; 12} 13 14function textfield_image(dragged,target) { 15 var childs=dragged.parentNode.childNodes; 16 var i; 17 for (i=0; i<childs.length; i++) { 18 if (childs[i].nodeName=="INPUT") { 19 break; 20 } 21 } 22 if (i<childs.length) target.firstChild.src=childs[i].value; 23} 24 25function strip_tags(html){ 26 27 //PROCESS STRING 28 if(arguments.length < 3) { 29 html=html.replace(/<\/?(?!\!)[^>]*>/gi, ''); 30 } else { 31 var allowed = arguments[1]; 32 var specified = eval("["+arguments[2]+"]"); 33 if(allowed){ 34 var regex='</?(?!(' + specified.join('|') + '))\b[^>]*>'; 35 html=html.replace(new RegExp(regex, 'gi'), ''); 36 } else{ 37 var regex='</?(' + specified.join('|') + ')\b[^>]*>'; 38 html=html.replace(new RegExp(regex, 'gi'), ''); 39 } 40 } 41 42 //CHANGE NAME TO CLEAN JUST BECAUSE 43 var clean_string = html; 44 45 //RETURN THE CLEAN STRING 46 return clean_string; 47} 48 49function notice_cart(dragged,target) { 50 id=dragged.getAttribute("id"); 51 id=id.substring(10); 52 target.src="cart_info.php?id="+id+"&header="+encode_URL(strip_tags(dragged.innerHTML)); 53}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.