mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix query tool launch error if user name contain html characters. Fixes #4674
This commit is contained in:
committed by
Akshay Joshi
parent
28b741a13a
commit
dbbbb2e5ed
@@ -227,7 +227,7 @@ define('pgadmin.datagrid', [
|
||||
queryToolForm +=`
|
||||
</form>
|
||||
<script>
|
||||
document.getElementById("title").value = "${panel_title}";
|
||||
document.getElementById("title").value = "${_.escape(panel_title)}";
|
||||
document.getElementById("queryToolForm").submit();
|
||||
</script>
|
||||
`;
|
||||
|
||||
@@ -52,6 +52,6 @@ export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_fi
|
||||
panel_icon = 'fa fa-bolt';
|
||||
}
|
||||
|
||||
panel.title('<span title="'+ panel_tooltip +'">'+ panel_title +'</span>');
|
||||
panel.title('<span title="'+ _.escape(panel_tooltip) +'">'+ _.escape(panel_title) +'</span>');
|
||||
panel.icon(panel_icon);
|
||||
}
|
||||
|
||||
@@ -3436,7 +3436,7 @@ define('tools.querytool', [
|
||||
// Find the title of the visible panel
|
||||
_.each(window.top.pgAdmin.Browser.docker.findPanels('frm_datagrid'), function(p) {
|
||||
if (p.isVisible()) {
|
||||
self.gridView.panel_title = $(p._title).html();
|
||||
self.gridView.panel_title = $(p._title).text();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user