str values before bleach
Can't operate on objects, stringing seems fine here, there's a lot else already randomly str() before bleach.
This commit is contained in:
		
							parent
							
								
									66224d6834
								
							
						
					
					
						commit
						5511a3d00a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -573,7 +573,7 @@ def attendee(request, form, user_id=None): | |||
|             value = ", ".join(str(i) for i in value.all()) | ||||
|         elif isinstance(field, CharField): | ||||
|             try: | ||||
|                 value = bleach.clean(value) | ||||
|                 value = bleach.clean(str(value)) | ||||
|             except TypeError: | ||||
|                 value = "Bad value for %s" % field.name | ||||
| 
 | ||||
|  | @ -864,7 +864,7 @@ def attendee_data(request, form, user_id=None): | |||
|             return [str(i) for i in attr.all()] or "" | ||||
|         else: | ||||
|             try: | ||||
|                 return bleach.clean(attr) | ||||
|                 return bleach.clean(str(attr)) | ||||
|             except TypeError: | ||||
|                 return "Bad value found for %s" % attr | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Sachi King
						Sachi King