Ensure that macros should be run on the older version of Safari and Chrome. Fixes #5911

This commit is contained in:
Khushboo Vashi
2020-10-15 15:59:53 +05:30
committed by Akshay Joshi
parent 98817a718f
commit 6addd207af
3 changed files with 24 additions and 2 deletions

View File

@@ -2801,7 +2801,8 @@ define('tools.querytool', [
.done(function(res) {
if (res) {
// Replace the place holder
let query = res.sql.replaceAll('$SELECTION$', self.gridView.query_tool_obj.getSelection());
const regex = /\$SELECTION\$/gi;
let query = res.sql.replace(regex, self.gridView.query_tool_obj.getSelection());
const executeQuery = new ExecuteQuery.ExecuteQuery(self, pgAdmin.Browser.UserManagement);
executeQuery.poll = pgBrowser.override_activity_event_decorator(executeQuery.poll).bind(executeQuery);