fix: use encodeURIComponent when getting table metadata (#14790)

This commit is contained in:
Beto Dealmeida 2021-05-24 12:20:31 -07:00 committed by GitHub
parent 33cee65c3b
commit 65f90096fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -987,7 +987,9 @@ export function mergeTable(table, query) {
function getTableMetadata(table, query, dispatch) {
return SupersetClient.get({
endpoint: encodeURI(
`/api/v1/database/${query.dbId}/table/${table.name}/${table.schema}/`,
`/api/v1/database/${query.dbId}/table/${encodeURIComponent(
table.name,
)}/${encodeURIComponent(table.schema)}/`,
),
})
.then(({ json }) => {