cmaize.utilities/sanitize_url
- cmaize.utilities/sanitize_url.cmaize_sanitize_url(__su_result __su_url **kwargs)
Sanitizes and checks a URL.
This function removes any preceeding scheme identifier (https://) and optionally ensures that the given website domain is contained in the URL.
- Parameters:
__su_result (desc) – Return variable for sanitized URL.
__su_url (desc) – URL to sanitize.
**kwargs –
Additional keyword arguments may be necessary.
- Keyword Arguments:
DOMAIN (desc) – Domain of the URL. It will be verified that this domain is contained in the URL.
- Raises:
InvalidURL – URL is invalid.
- Returns:
The sanitized URL.
- Return type:
desc