Skip to content

Commit

Permalink
security: (sample) Resolve XSS issue in external webview page
Browse files Browse the repository at this point in the history
  • Loading branch information
corycaywood committed Feb 4, 2021
1 parent cd60ab7 commit ff52cd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js-miniapp-sample/external-webview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ <h3>Return To Mini App</h3>
const passedParams = window.location.search
// This page is loaded via a query parameter so we must remove the section which isn't relevant
.replace(/^[?](.*?)[?]/, '?');
document.getElementById('PassedParams').innerHTML = passedParams || 'None';
const text = document.createElement('span');
text.innerText = passedParams || 'None';
document.getElementById('PassedParams').appendChild(text);

// Set return URL and params
const returnInput = document.getElementById('ReturnInput');
Expand Down

0 comments on commit ff52cd2

Please sign in to comment.