leizongmin / js-xss

Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist
http://jsxss.com
Other
5.2k stars 629 forks source link

DedicatedWorkerGlobalScope is not defined #140

Closed caption-dylan closed 6 years ago

caption-dylan commented 6 years ago

image

Asvarox commented 6 years ago

Yes, this was introduced with #124, specifically the isWorkerEnv function introduced https://github.com/leizongmin/js-xss/commit/723b307a32541044e4f4dcbb260c34b3168e87f2 commit. I'm preparing a PR with the fix.

Until that's merged, you can get around the issue with installing v1.0.0 of the lib, yarn add xss@1.0.0

leizongmin commented 6 years ago

Please try the new version xss@1.0.3

caption-dylan commented 6 years ago

ok, thank you! @Asvarox @leizongmin