mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	callbacks for select2 can now handle numeric values for data attributes
This commit is contained in:
		
							parent
							
								
									f32ac518ea
								
							
						
					
					
						commit
						556ec6de14
					
				|  | @ -5,8 +5,12 @@ | |||
|  * (see https://forums.select2.org/t/propperly-escape-option-value-to-prevent-xss/788)
 | ||||
|  */ | ||||
| chzn_template_func =  function (state) { | ||||
| 	var subtitle = $(state.element).data('subtitle'); | ||||
| 	var warning = $(state.element).data('warning'); | ||||
| 	var subtitle = ''; | ||||
| 	if($(state.element).data('subtitle')) | ||||
| 		subtitle = $(state.element).data('subtitle')+''; /* make sure it is a string */ | ||||
| 	var warning = ''; | ||||
| 	if($(state.element).data('warning')) | ||||
| 		warning = $(state.element).data('warning')+''; /* make sure it is a string */ | ||||
| 	var html = '<span>'+state.text.replace(/</g, '<')+''; | ||||
| 	if(subtitle) | ||||
| 		html += '<br /><i>'+subtitle.replace(/</g, '<')+'</i>'; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann