Skip to content

Commit

Permalink
whitelist more css option in xss
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafasaifee42 committed Nov 15, 2024
1 parent 5eff983 commit ca57d1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@undp-data/undp-visualization-library",
"version": "1.0.1",
"version": "1.0.2",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"browser": "./dist/index.umd.js",
Expand Down
10 changes: 10 additions & 0 deletions src/Utils/string2HTML.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function string2HTML(htmlString: string, data: any) {
padding: true,
border: true,
'border-radius': true,
'border-color': true,
display: true,
flex: true,
'flex-direction': true,
Expand Down Expand Up @@ -108,13 +109,22 @@ export function string2HTML(htmlString: string, data: any) {
'margin-right': true,
'margin-bottom': true,
'z-index': true,
'word-wrap': true,
visibility: true,
opacity: true,
filter: true,
transform: true,
transition: true,
cursor: true,
clip: true,
hyphens: true,
direction: true,
'word-break': true,
'max-width': true,
'min-width': true,
'max-height': true,
'min-height': true,
fill: true,
'clip-path': true,
},
},
Expand Down

0 comments on commit ca57d1a

Please sign in to comment.