def strip_whitespace(string):
    """Use the HTML definition of "space character",
    not all Unicode Whitespace.

    https://www.whatwg.org/html#strip-leading-and-trailing-whitespace
    https://www.whatwg.org/html#space-character

    """
    return string.strip(HTML_WHITESPACE)
Use the HTML definition of "space character",
not all Unicode Whitespace.

https://www.whatwg.org/html#strip-leading-and-trailing-whitespace
https://www.whatwg.org/html#space-character
weasyprint/html.py