/
Ao
/
MaxReport
Обзор
Документация
Войти
/
Ao
/
MaxReport
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
pgsql/pgAdmin 4/web/pgadmin/utils/html.py
28 строк
706 B
AoAnima
first_commit
13 июл 2026, 17:47
13 июл 2026, 17:47
f1a670a
Код
Авторство
О чём код?
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2026, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ######################################################################### """Utilities for HTML""" from html import escape as html_escape def safe_str(x): try: # For Python3, it can be int, float if isinstance(x, (int, float)): x = str(x) x = x.encode( 'ascii', 'xmlcharrefreplace' ) if hasattr(x, 'encode') else x x = x.decode('utf-8') except Exception: pass return html_escape(x, False)