mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where <br/> tag is visible in the error message when delete any database and it is in use.
This commit is contained in:
@@ -34,7 +34,6 @@ from pgadmin.tools.sqleditor.utils.query_history import QueryHistory
|
||||
|
||||
from pgadmin.tools.schema_diff.node_registry import SchemaDiffRegistry
|
||||
from pgadmin.model import db, Server, Database
|
||||
from pgadmin.browser.utils import underscore_escape
|
||||
from pgadmin.utils.constants import TWO_PARAM_STRING
|
||||
|
||||
|
||||
@@ -1074,7 +1073,7 @@ class DatabaseView(PGChildNodeView):
|
||||
status, errmsg = conn.connect()
|
||||
|
||||
return internal_server_error(
|
||||
errormsg=underscore_escape(msg))
|
||||
errormsg=msg)
|
||||
|
||||
return make_json_response(success=1)
|
||||
|
||||
|
@@ -40,6 +40,7 @@ from pgadmin.utils.master_password import get_crypt_key
|
||||
from io import StringIO
|
||||
from pgadmin.utils.locker import ConnectionLocker
|
||||
from pgadmin.utils.driver import get_driver
|
||||
from pgadmin.browser.utils import underscore_escape
|
||||
|
||||
|
||||
# On Windows, Psycopg is not compatible with the default ProactorEventLoop.
|
||||
@@ -1688,7 +1689,7 @@ Failed to reset the connection to the server due to following error:
|
||||
# if formatted_msg is false then return from the function
|
||||
if not formatted_msg:
|
||||
notices = self.get_notices()
|
||||
errmsg = errmsg.replace('\n', '<br/>')
|
||||
errmsg = underscore_escape(errmsg).replace('\n', '<br/>')
|
||||
return errmsg if notices == '' else notices + '\n' + errmsg
|
||||
|
||||
# Do not append if error starts with `ERROR:` as most pg related
|
||||
|
Reference in New Issue
Block a user