mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 14:10:05 -05:00
Don't wait for the database connection before rendering the Query Tool UI, for improved UX. Fixes #4453
In addition, unescape HTML entities in database names in the Query Tool title bar. Fixes #4584
This commit is contained in:
1 parent
25f85fe123
commit
234efc3be7
28 files changed
+337
-449
No files matched your search
@@ -47,6 +47,30 @@ def underscore_escape(text):
|
||||
return text
|
||||
|
||||
|
||||
def underscore_unescape(text):
|
||||
"""
|
||||
This function mimics the behaviour of underscore js unescape function
|
||||
The html unescape by jinja is not compatible for underscore escape
|
||||
function
|
||||
:param text: input html text
|
||||
:return: unescaped text
|
||||
"""
|
||||
html_map = {
|
||||
"&": '&',
|
||||
"<": '<',
|
||||
">": '>',
|
||||
""": '"',
|
||||
"`": '`',
|
||||
"'": "'"
|
||||
}
|
||||
|
||||
# always replace & first
|
||||
for c, r in html_map.items():
|
||||
text = text.replace(c, r)
|
||||
|
||||
return text
|
||||
|
||||
|
||||
def is_version_in_range(sversion, min_ver, max_ver):
|
||||
assert (max_ver is None or isinstance(max_ver, int))
|
||||
assert (min_ver is None or isinstance(min_ver, int))
|
||||
|
||||
Reference in new issue
Block a user