Skip to content

Commit

Permalink
fix: use encodeURIComponent when getting table metadata (apache#14790)
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored May 24, 2021
1 parent 19c4cf0 commit fafd533
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset-frontend/src/SqlLab/actions/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down

0 comments on commit fafd533

Please sign in to comment.