Library of web-related functions for HTML manipulation, HTTP processing, URL handling, and encoding detection
84
A Python module that provides URL sanitization functionality to ensure URLs are safe and properly formatted for use in web applications.
http://example.com/path with spaces/file.html, returns a properly encoded URL @testhttp://münchen.de/page, handles the internationalized domain name correctly @testhttp://example.com/search?q=hello%20world&name=test, normalizes the encoding @test123 or not-a-url, returns None @testThe module should provide a function that takes a URL string as input and returns a sanitized, safe version of the URL. The function should:
@generates
def sanitize_url(url: str) -> str | None:
"""
Sanitizes a URL to ensure it is safe and properly formatted.
Args:
url: The URL string to sanitize
Returns:
A sanitized URL string, or None if the input is invalid
"""
passProvides URL manipulation and validation utilities.
Install with Tessl CLI
npx tessl i tessl/pypi-w3libevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10