Skip to content

Commit

Permalink
feat(packages/sui-js): exclude script tags in html sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
stivaliserna committed Dec 1, 2023
1 parent ebe0866 commit 92d8ff9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/sui-js/src/react/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
export {default as htmlStringToReactElement} from 'htmr'
import htmr from 'htmr'

export const htmlStringToReactElement = (string, options) => htmr(string, {

Check failure on line 3 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Insert `⏎·`
...options,

Check failure on line 4 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Insert `··`
transform: {

Check failure on line 5 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Insert `··`
script: () => null,

Check failure on line 6 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Replace `····` with `······`
...options?.transform

Check failure on line 7 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Insert `··`
}

Check failure on line 8 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Replace `··` with `····`
})

Check failure on line 9 in packages/sui-js/src/react/index.js

View workflow job for this annotation

GitHub Actions / build

Insert `··`

const isReactRefObj = target => {
if (target && typeof target === 'object') {
Expand Down

0 comments on commit 92d8ff9

Please sign in to comment.