faker
faker copied to clipboard
Sanitize html in docs
https://github.com/faker-js/faker/blob/51a88634092dbe17985e434572385af4e99d1022/scripts/apidoc/signature.ts#L65
Could we use the sanitize-html npm package?
This is literally what we have used before: https://github.com/faker-js/faker/blob/51a88634092dbe17985e434572385af4e99d1022/scripts/apidoc/signature.ts#L65-L76
This is literally what we have used before:
https://github.com/faker-js/faker/blob/51a88634092dbe17985e434572385af4e99d1022/scripts/apidoc/signature.ts#L65-L76
My bad, I skipped over the commented block. I just tried uncommenting the sanitizing code and the options object, but the tests started failing.
Sorry, I don't understand this issue. Could you give an example of where XSS would be possible? As far as I can tell only intern source code is used in the parsing process.
This is an optional safeguard against issues in our jsdocs examples -> api docs (review) process. The examples should stay exactly that: textual examples.