add lib
This commit is contained in:
		
							
								
								
									
										7
									
								
								passbook/lib/utils/urls.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								passbook/lib/utils/urls.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | ||||
| """URL-related utils""" | ||||
| from urllib.parse import urlparse | ||||
|  | ||||
|  | ||||
| def is_url_absolute(url): | ||||
|     """Check if domain is absolute to prevent user from being redirect somewhere else""" | ||||
|     return bool(urlparse(url).netloc) | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer