as part of the task “sanitizing user input” I’m using the npm lib DOMPurify within Custom UI successfully.
I tried to do the same for Forge UI Kit.
The simple approach (just install DOMPurify) doesn’t work. (" … sanitizer is not a function …").
Sure. DOMPurify needs a browser to work on. So I tried 2 options:
First I thought the code will run, but the deploy stage led to the error:
" Error thrown in the snapshot context.
App code snapshot error: Snapshot error occurred: Error: webpack_require (…) is not a function"
DOMPurify + jsdom
This led to the same snapshot error.
So my questions to you as experienced guys & Atlassian staff:
- Do I need the sanatizing of user input in Forge UI Kit at all? Or is it already built-in?
(I couldn’t find any clear documentation about this. Especially the difference between Forge UI Kit and Custom UI related to this topic)
- If I need to do it:
o Is there a workaround to my described problems?
o Are there other options?
Thanks a lot!!