diff --git a/.github/issue_template.md b/.github/issue_template.md index 6c38d3a4..0c45b92b 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -25,7 +25,7 @@ or anything that violates the specifications. | Which Swagger/OpenAPI version? | | Which Swagger-UI version? | | How did you install Swagger-UI? | -| Which broswer & version? | +| Which browser & version? | | Which operating system? | diff --git a/dev-helpers/oauth2-redirect.html b/dev-helpers/oauth2-redirect.html index 00c7f014..a7eb162d 100644 --- a/dev-helpers/oauth2-redirect.html +++ b/dev-helpers/oauth2-redirect.html @@ -11,7 +11,11 @@ var redirectUrl = oauth2.redirectUrl; var isValid, qp, arr; - qp = (window.location.hash || location.search).substring(1); + if (/code|token|error/.test(window.location.hash)) { + qp = window.location.hash.substring(1); + } else { + qp = location.search.substring(1); + } arr = qp.split("&") arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';}) diff --git a/dist/oauth2-redirect.html b/dist/oauth2-redirect.html index 00c7f014..a7eb162d 100644 --- a/dist/oauth2-redirect.html +++ b/dist/oauth2-redirect.html @@ -11,7 +11,11 @@ var redirectUrl = oauth2.redirectUrl; var isValid, qp, arr; - qp = (window.location.hash || location.search).substring(1); + if (/code|token|error/.test(window.location.hash)) { + qp = window.location.hash.substring(1); + } else { + qp = location.search.substring(1); + } arr = qp.split("&") arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})