Skip to content
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

Can't use escapeHtml #499

Open
jeky1950 opened this issue Jul 30, 2024 · 1 comment
Open

Can't use escapeHtml #499

jeky1950 opened this issue Jul 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jeky1950
Copy link

Nuxt Version: 3.11.2
Nuxt Security Version: 2.0.0-rc.9

Its entirely possible that it could be my fault, please correct me if so. I wanted to convert all < to < and > to > in my request body, so I added this to my nuxt.config.ts

xssValidator: { escapeHtml: true },

but I keep getting this error

ERROR [nuxt] [request error] [unhandled] [500] escapeHtml is not a function at parseTag (C:\Users\User\Documents\project\node_modules\xss\lib\parser.js:110:16) at FilterXSS.process (C:\Users\User\Documents\project\node_modules\xss\lib\xss.js:162:17) at Object.handler (C:\Users\User\Documents\project\node_modules\nuxt-security\dist\runtime\server\middleware\xssValidator.mjs:15:47) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /C:/Users/User\Documents\project/node_modules/h3/dist/index.mjs:1962:19 at async Object.callAsync (/C:/Users/User\Documents\project/node_modules/unctx/dist/index.mjs:72:16) at async Server.toNodeHandle (/C:/Users/User\Documents\project/node_modules/h3/dist/index.mjs:2249:7)

@jeky1950 jeky1950 added the bug Something isn't working label Jul 30, 2024
@Baroshem
Copy link
Collaborator

Baroshem commented Aug 6, 2024

Hey there, sorry but I missed this issue completely, could you create a reproduction link with this issue? I cannot reproduce it :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants