MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / underscore_unescape

Function underscore_unescape

web/pgadmin/browser/utils.py:52–73  ·  view source on GitHub ↗

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

(text)

Source from the content-addressed store, hash-verified

50
51
52def underscore_unescape(text):
53 """
54 This function mimics the behaviour of underscore js unescape function
55 The html unescape by jinja is not compatible for underscore escape
56 function
57 :param text: input html text
58 :return: unescaped text
59 """
60 html_map = {
61 "&": '&',
62 "&lt;": '<',
63 "&gt;": '>',
64 "&quot;": '"',
65 "&#39;": "'"
66 }
67
68 # always replace & first
69 if text:
70 for c, r in html_map.items():
71 text = text.replace(c, r)
72
73 return text
74
75
76def is_version_in_range(sversion, min_ver, max_ver):

Callers 3

start_processFunction · 0.90
get_connection_strFunction · 0.90
panelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected