apostrophecms / sanitize-html

Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance
MIT License
3.68k stars 349 forks source link

Update index.js #586

Closed lauhon closed 1 year ago

lauhon commented 1 year ago

In case the input is not a string, would it be okay to just return the input?

I have a case, where its not certain what goes into the function. If a number goes in, or a number array, it will convert the numbers to strings which an cause problems for my project down the line.