def escape_rich_markup(text):
    """Escape special characters in text to prevent Rich markup interpretation"""
    if text is None:
        return ""
    
    # Convert to string if not already
    if not isinstance(text, str):
        text = str(text)
    
    # Use Rich's built-in escape function
    return escape(text)
Escape special characters in text to prevent Rich markup interpretation
src/upsonic/client/printing.py