-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client side issue #560
Comments
I see. Since we don't use sanitize-html on the front end, support for front end use comes from the community. It will likely help if you can provide a simple test project. |
Here we can see the error in the console: |
The solution for the problem with `sanitize-html` was to use the `dompurify` library instead which works on both client and server side. Related issues: vitejs/vite#9200 apostrophecms/sanitize-html#560
@PlopTheReal |
I tried using dompurify but it was missing some features that I depend on such as not lower casing tags since I'm using Vue there are some Vue Components involved and also closing tags that are missing them. I was able to work around the Module "fs" has been externalized for browser compatibility issue by aliasing some nodejs packages to an empty file, we are using Nuxt 3 here is an example of how I was able to alias this, I only needed to do it in dev, in build it is not an issue
|
any updates? |
Not sure if that's not postcss issue but when importing the library on the browser I'm getting the following:
sanitize-html 2.7.1
postcss 8.4.14
Server Operating System:
System:
OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)
CPU: (1) x64 Intel(R) Xeon(R) CPU X5570 @ 2.93GHz
Memory: 3.26 GB / 12.68 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
Browsers:
Firefox: 102.0.1
The base framework is SvelteKit
The text was updated successfully, but these errors were encountered: