salesforce / secure-filters

Anti-XSS Security Filters for EJS and More
BSD 3-Clause "New" or "Revised" License
139 stars 39 forks source link

Client-side support #9

Closed stash closed 11 years ago

stash commented 11 years ago

The secureFilters.uri function uses Buffer to parse utf8 into bytes, which prevents using secure-filters client-side. If we can substitute this out and use String#charCodeAt instead, then we could use EJS client-side too.

stash commented 11 years ago

Note that charCodeAt gives you the UTF-16 code-point; converting from that to UTF-8 bytes involves math. Probably somebody else has solved this so it's worth hunting around.

stash commented 11 years ago

Need AMD loading too.

stash commented 11 years ago

First part: https://github.com/goinstant/secure-filters/pull/10