HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/mysqlsh/lib/python3.8/site-packages/svg/_helpers.py
from __future__ import annotations

from ._types import Length, Number


def escape(text: str) -> str:
    """Make the text safe to use in SVG.
    """
    text = text.replace("&", "&")
    text = text.replace(">", ">")
    text = text.replace("<", "&lt;")
    return text


def mm(val: Number) -> Length:
    """Explicitly specify mm unit for the value.
    """
    return Length(value=val, unit='mm')


def px(val: Number) -> Length:
    """Explicitly specify px unit for the value.
    """
    return Length(value=val, unit='px')