mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 11:52:12 +03:00
Merge pull request #175 from cchesk/cleanpr
Fixed broken export to CSV/JSON/XML if hashmark in URL
This commit is contained in:
commit
9430d734a7
@ -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