Skip to content

Commit

Permalink
Code scanning - DOM text reinterpreted as HTML #1427
Browse files Browse the repository at this point in the history
missed uri encoding for url base
  • Loading branch information
kkrug committed Sep 17, 2024
1 parent 59e6fad commit 61cecd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ const renderRouter = () => (
)

const rootElement = document.getElementById('challenge-gov-react-app')
const apiUrl = rootElement.getAttribute('data-api-url')
const apiUrl = encodeURI(rootElement.getAttribute('data-api-url'))
const publicUrl = rootElement.getAttribute('data-public-url')
const imageBase = rootElement.getAttribute('data-image-base')
const imageBase = encodeURI(rootElement.getAttribute('data-image-base'))
const bridgeApplyBlocked = rootElement.getAttribute('data-bridge-apply-blocked') != 'false'

ReactDOM.render(renderRouter(), rootElement);
Expand Down

0 comments on commit 61cecd3

Please sign in to comment.