mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
Fixed broken export to CSV/JSON/XML if hashmark in URL
This commit is contained in:
parent
dd71d1c49e
commit
a9fe99b09b
@ -211,7 +211,7 @@ function performTableAction(table, action, el) {
|
||||
var format = el.data("format");
|
||||
var filename = table + "." + format;
|
||||
var query = window.encodeURI("SELECT * FROM " + table);
|
||||
var url = window.location.href + "api/query?format=" + format + "&filename=" + filename + "&query=" + query + "&_session_id=" + getSessionId();
|
||||
var url = window.location.href.split('#')[0] + "api/query?format=" + format + "&filename=" + filename + "&query=" + query + "&_session_id=" + getSessionId();
|
||||
var win = window.open(url, "_blank");
|
||||
win.focus();
|
||||
break;
|
||||
@ -542,7 +542,7 @@ function exportTo(format) {
|
||||
return;
|
||||
}
|
||||
|
||||
var url = window.location.href + "api/query?format=" + format + "&query=" + encodeQuery(query) + "&_session_id=" + getSessionId();
|
||||
var url = window.location.href.split('#')[0] + "api/query?format=" + format + "&query=" + encodeQuery(query) + "&_session_id=" + getSessionId();
|
||||
var win = window.open(url, '_blank');
|
||||
|
||||
setCurrentTab("table_query");
|
||||
|
Loading…
Reference in New Issue
Block a user