Skip to content

Commit a410b15

Browse files
committed
Fixed an issue where <br/> tag is visible in the error message when delete any database and it is in use.
1 parent 72a3ed9 commit a410b15

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ RUN apk add --no-cache \
218218
chown pgadmin:root /pgadmin4/config_distro.py && \
219219
chmod g=u /pgadmin4/config_distro.py && \
220220
chmod g=u /etc/passwd && \
221-
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.13 && \
221+
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.12 && \
222222
echo "pgadmin ALL = NOPASSWD: /usr/sbin/postfix start" > /etc/sudoers.d/postfix && \
223223
echo "pgadminr ALL = NOPASSWD: /usr/sbin/postfix start" >> /etc/sudoers.d/postfix
224224

docs/en_US/release_notes_9_0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ Bug fixes
4646
| `Issue #8299 <https://github.com/pgadmin-org/pgadmin4/issues/8299>`_ - Ensure master password pop up is not shown on setting MASTER_PASSWORD_REQUIRED to false.
4747
| `Issue #8309 <https://github.com/pgadmin-org/pgadmin4/issues/8309>`_ - Remove the option "With no data (concurrently)" from Refresh MATERIALIZED VIEW context menu.
4848
| `Issue #8320 <https://github.com/pgadmin-org/pgadmin4/issues/8320>`_ - Fix an issue where wrong information is shown after using the filter on the Dashboard> State tab.
49+
| `Issue #8365 <https://github.com/pgadmin-org/pgadmin4/issues/8365>`_ - Fixed an issue where PSQL tool is not opening if database name have HTML characters in the name.

web/pgadmin/browser/server_groups/servers/databases/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
from pgadmin.tools.schema_diff.node_registry import SchemaDiffRegistry
3636
from pgadmin.model import db, Server, Database
37-
from pgadmin.browser.utils import underscore_escape
3837
from pgadmin.utils.constants import TWO_PARAM_STRING
3938

4039

@@ -1074,7 +1073,7 @@ def delete(self, gid, sid, did=None):
10741073
status, errmsg = conn.connect()
10751074

10761075
return internal_server_error(
1077-
errormsg=underscore_escape(msg))
1076+
errormsg=msg)
10781077

10791078
return make_json_response(success=1)
10801079

web/pgadmin/utils/driver/psycopg3/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from io import StringIO
4141
from pgadmin.utils.locker import ConnectionLocker
4242
from pgadmin.utils.driver import get_driver
43+
from pgadmin.browser.utils import underscore_escape
4344

4445

4546
# On Windows, Psycopg is not compatible with the default ProactorEventLoop.
@@ -1688,7 +1689,7 @@ def _formatted_exception_msg(self, exception_obj, formatted_msg):
16881689
# if formatted_msg is false then return from the function
16891690
if not formatted_msg:
16901691
notices = self.get_notices()
1691-
errmsg = errmsg.replace('\n', '<br/>')
1692+
errmsg = underscore_escape(errmsg).replace('\n', '<br/>')
16921693
return errmsg if notices == '' else notices + '\n' + errmsg
16931694

16941695
# Do not append if error starts with `ERROR:` as most pg related

0 commit comments

Comments
 (0)